/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @endpointRule = 'central';
  
  checkConfig(config);
  @endpoint = getEndpoint('rtc', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  backgroundColor?: int32(name='BackgroundColor', example='0'),
  backgrounds?: [ 
    {
      display?: int32(name='Display', example='0'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Backgrounds'),
  clockWidgets?: [ 
    {
      fontColor?: int32(name='FontColor', example='0'),
      fontSize?: int32(name='FontSize', example='1'),
      fontType?: int32(name='FontType', example='0'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='ClockWidgets'),
  delayStopTime?: int32(name='DelayStopTime', example='180'),
  enableM3u8DateTime?: boolean(name='EnableM3u8DateTime', example='false'),
  fileSplitInterval?: int32(name='FileSplitInterval', description='This parameter is required.', example='1800'),
  formats?: [ string ](name='Formats', description='This parameter is required.', example='mp4'),
  httpCallbackUrl?: string(name='HttpCallbackUrl', example='http://example.com/callback'),
  layoutIds?: [ long ](name='LayoutIds', description='This parameter is required.', example='2'),
  mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='20'),
  mnsQueue?: string(name='MnsQueue', example='record-callback-queue'),
  name?: string(name='Name', description='This parameter is required.'),
  ossBucket?: string(name='OssBucket', description='This parameter is required.', example='rtc-record-oss'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossFilePrefix?: string(name='OssFilePrefix', description='This parameter is required.', example='record/{AppId}/{ChannelId_TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
  ownerId?: long(name='OwnerId'),
  taskProfile?: string(name='TaskProfile', description='This parameter is required.', example='4IN_1080P'),
  watermarks?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      display?: int32(name='Display', example='0'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Watermarks'),
}

model AddRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  templateId?: string(name='TemplateId', example='76dasgb****'),
}

model AddRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddRecordTemplateResponseBody(name='body'),
}

/**
 * @param request AddRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddRecordTemplateResponse
 */
async function addRecordTemplateWithOptions(request: AddRecordTemplateRequest, runtime: $RuntimeOptions): AddRecordTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgroundColor)) {
    query['BackgroundColor'] = request.backgroundColor;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.delayStopTime)) {
    query['DelayStopTime'] = request.delayStopTime;
  }
  if (!$isNull(request.enableM3u8DateTime)) {
    query['EnableM3u8DateTime'] = request.enableM3u8DateTime;
  }
  if (!$isNull(request.fileSplitInterval)) {
    query['FileSplitInterval'] = request.fileSplitInterval;
  }
  if (!$isNull(request.formats)) {
    query['Formats'] = request.formats;
  }
  if (!$isNull(request.httpCallbackUrl)) {
    query['HttpCallbackUrl'] = request.httpCallbackUrl;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.mnsQueue)) {
    query['MnsQueue'] = request.mnsQueue;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!$isNull(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!$isNull(request.ossFilePrefix)) {
    query['OssFilePrefix'] = request.ossFilePrefix;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.taskProfile)) {
    query['TaskProfile'] = request.taskProfile;
  }
  if (!$isNull(request.watermarks)) {
    query['Watermarks'] = request.watermarks;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'AddRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AddRecordTemplateRequest
 * @return AddRecordTemplateResponse
 */
async function addRecordTemplate(request: AddRecordTemplateRequest): AddRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return addRecordTemplateWithOptions(request, runtime);
}

model CreateAppLayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  layout?: {
    name?: string(name='Name', description='This parameter is required.', example='布局'),
    panes?: [ 
      {
        height?: double(name='Height', example='0.25'),
        paneId?: long(name='PaneId', example='0'),
        width?: double(name='Width', example='0.25'),
        x?: double(name='X', example='0.25'),
        y?: double(name='Y', example='0.25'),
        ZOrder?: int32(name='ZOrder', example='0'),
      }
    ](name='Panes', description='This parameter is required.'),
  }(name='Layout', description='This parameter is required.'),
}

model CreateAppLayoutShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  layoutShrink?: string(name='Layout', description='This parameter is required.'),
}

model CreateAppLayoutResponseBody = {
  layoutId?: string(name='LayoutId', example='167466539798442****'),
  requestId?: string(name='RequestId', description='Id of the request', example='20A6D1E3-1F5F-5440-A4F1-EC7831646FE4'),
}

model CreateAppLayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppLayoutResponseBody(name='body'),
}

/**
 * @summary 新增app自定义布局
 *
 * @param tmpReq CreateAppLayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppLayoutResponse
 */
async function createAppLayoutWithOptions(tmpReq: CreateAppLayoutRequest, runtime: $RuntimeOptions): CreateAppLayoutResponse {
  tmpReq.validate();
  var request = new CreateAppLayoutShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layout)) {
    request.layoutShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layout, 'Layout', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.layoutShrink)) {
    query['Layout'] = request.layoutShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateAppLayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增app自定义布局
 *
 * @param request CreateAppLayoutRequest
 * @return CreateAppLayoutResponse
 */
async function createAppLayout(request: CreateAppLayoutRequest): CreateAppLayoutResponse {
  var runtime = new $RuntimeOptions{};
  return createAppLayoutWithOptions(request, runtime);
}

model CreateAppRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  recordTemplate?: {
    delayStopTime?: int32(name='DelayStopTime', example='180'),
    filePrefix?: string(name='FilePrefix', description='This parameter is required.', example='record/{AppId}/{ChannelId}_{TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
    fileSplitInterval?: int32(name='FileSplitInterval', description='This parameter is required.', example='1800'),
    formats?: [ string ](name='Formats', description='This parameter is required.'),
    layoutIds?: [ string ](name='LayoutIds'),
    mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='1'),
    name?: string(name='Name', description='This parameter is required.', example='模版'),
  }(name='RecordTemplate', description='This parameter is required.'),
}

model CreateAppRecordTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  recordTemplateShrink?: string(name='RecordTemplate', description='This parameter is required.'),
}

model CreateAppRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  templateId?: string(name='TemplateId', example='lD7muaxx'),
}

model CreateAppRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppRecordTemplateResponseBody(name='body'),
}

/**
 * @summary 增加应用录制模版
 *
 * @param tmpReq CreateAppRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppRecordTemplateResponse
 */
async function createAppRecordTemplateWithOptions(tmpReq: CreateAppRecordTemplateRequest, runtime: $RuntimeOptions): CreateAppRecordTemplateResponse {
  tmpReq.validate();
  var request = new CreateAppRecordTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.recordTemplate)) {
    request.recordTemplateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.recordTemplate, 'RecordTemplate', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.recordTemplateShrink)) {
    query['RecordTemplate'] = request.recordTemplateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateAppRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 增加应用录制模版
 *
 * @param request CreateAppRecordTemplateRequest
 * @return CreateAppRecordTemplateResponse
 */
async function createAppRecordTemplate(request: CreateAppRecordTemplateRequest): CreateAppRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return createAppRecordTemplateWithOptions(request, runtime);
}

model CreateAppStreamingOutTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  streamingOutTemplate?: {
    layoutIds?: [ string ](name='LayoutIds', description='This parameter is required.'),
    mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='1'),
    name?: string(name='Name', description='This parameter is required.', example='模版'),
  }(name='StreamingOutTemplate', description='This parameter is required.'),
}

model CreateAppStreamingOutTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  streamingOutTemplateShrink?: string(name='StreamingOutTemplate', description='This parameter is required.'),
}

model CreateAppStreamingOutTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='30D41049-D02D-1C21-86AE-B3E5FD805C27'),
  templateId?: string(name='TemplateId', example='bc5v****'),
}

model CreateAppStreamingOutTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAppStreamingOutTemplateResponseBody(name='body'),
}

/**
 * @summary 创建应用推流模版
 *
 * @param tmpReq CreateAppStreamingOutTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAppStreamingOutTemplateResponse
 */
async function createAppStreamingOutTemplateWithOptions(tmpReq: CreateAppStreamingOutTemplateRequest, runtime: $RuntimeOptions): CreateAppStreamingOutTemplateResponse {
  tmpReq.validate();
  var request = new CreateAppStreamingOutTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.streamingOutTemplate)) {
    request.streamingOutTemplateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.streamingOutTemplate, 'StreamingOutTemplate', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.streamingOutTemplateShrink)) {
    query['StreamingOutTemplate'] = request.streamingOutTemplateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateAppStreamingOutTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建应用推流模版
 *
 * @param request CreateAppStreamingOutTemplateRequest
 * @return CreateAppStreamingOutTemplateResponse
 */
async function createAppStreamingOutTemplate(request: CreateAppStreamingOutTemplateRequest): CreateAppStreamingOutTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return createAppStreamingOutTemplateWithOptions(request, runtime);
}

model CreateAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  callBack?: string(name='CallBack', example='http://example.com/callback'),
  channelIdPrefixes?: [ string ](name='ChannelIdPrefixes'),
  channelIds?: [ string ](name='ChannelIds'),
  mediaEncode?: int32(name='MediaEncode', example='20'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', description='This parameter is required.', example='rtmp://${domain}/${app}/${stream}'),
  ruleName?: string(name='RuleName', example='testRule'),
}

model CreateAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  ruleId?: long(name='RuleId', example='12'),
}

model CreateAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request CreateAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAutoLiveStreamRuleResponse
 */
async function createAutoLiveStreamRuleWithOptions(request: CreateAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): CreateAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callBack)) {
    query['CallBack'] = request.callBack;
  }
  if (!$isNull(request.channelIdPrefixes)) {
    query['ChannelIdPrefixes'] = request.channelIdPrefixes;
  }
  if (!$isNull(request.channelIds)) {
    query['ChannelIds'] = request.channelIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!$isNull(request.ruleName)) {
    query['RuleName'] = request.ruleName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateAutoLiveStreamRuleRequest
 * @return CreateAutoLiveStreamRuleResponse
 */
async function createAutoLiveStreamRule(request: CreateAutoLiveStreamRuleRequest): CreateAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return createAutoLiveStreamRuleWithOptions(request, runtime);
}

model CreateEventSubscribeRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='9qb1****'),
  callbackUrl?: string(name='CallbackUrl', description='This parameter is required.', example='http://****.com/callback'),
  channelId?: string(name='ChannelId', example='123333'),
  clientToken?: string(name='ClientToken', description='This parameter is required.', example='123e4567-e89b-12d3-a456-42665544****'),
  events?: [ string ](name='Events', description='This parameter is required.', example='ChannelEvent'),
  needCallbackAuth?: boolean(name='NeedCallbackAuth', example='false'),
  ownerId?: long(name='OwnerId'),
  role?: long(name='Role', example='1'),
  users?: [ string ](name='Users', example='user1'),
}

model CreateEventSubscribeResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  subscribeId?: string(name='SubscribeId', example='ad53276431c****'),
}

model CreateEventSubscribeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateEventSubscribeResponseBody(name='body'),
}

/**
 * @param request CreateEventSubscribeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateEventSubscribeResponse
 */
async function createEventSubscribeWithOptions(request: CreateEventSubscribeRequest, runtime: $RuntimeOptions): CreateEventSubscribeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callbackUrl)) {
    query['CallbackUrl'] = request.callbackUrl;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.events)) {
    query['Events'] = request.events;
  }
  if (!$isNull(request.needCallbackAuth)) {
    query['NeedCallbackAuth'] = request.needCallbackAuth;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.role)) {
    query['Role'] = request.role;
  }
  if (!$isNull(request.users)) {
    query['Users'] = request.users;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateEventSubscribe',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateEventSubscribeRequest
 * @return CreateEventSubscribeResponse
 */
async function createEventSubscribe(request: CreateEventSubscribeRequest): CreateEventSubscribeResponse {
  var runtime = new $RuntimeOptions{};
  return createEventSubscribeWithOptions(request, runtime);
}

model CreateMPULayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  audioMixCount?: int32(name='AudioMixCount', description='This parameter is required.', example='3'),
  name?: string(name='Name', example='LayoutName'),
  ownerId?: long(name='OwnerId'),
  panes?: [ 
    {
      height?: float(name='Height', example='0.25'),
      majorPane?: int32(name='MajorPane', example='1'),
      paneId?: int32(name='PaneId', example='0'),
      width?: float(name='Width', example='0.25'),
      x?: float(name='X', example='0.25'),
      y?: float(name='Y', example='0.25'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Panes', description='This parameter is required.'),
}

model CreateMPULayoutResponseBody = {
  layoutId?: long(name='LayoutId', example='2'),
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model CreateMPULayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMPULayoutResponseBody(name='body'),
}

/**
 * @param request CreateMPULayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMPULayoutResponse
 */
async function createMPULayoutWithOptions(request: CreateMPULayoutRequest, runtime: $RuntimeOptions): CreateMPULayoutResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.audioMixCount)) {
    query['AudioMixCount'] = request.audioMixCount;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateMPULayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateMPULayoutRequest
 * @return CreateMPULayoutResponse
 */
async function createMPULayout(request: CreateMPULayoutRequest): CreateMPULayoutResponse {
  var runtime = new $RuntimeOptions{};
  return createMPULayoutWithOptions(request, runtime);
}

model DeleteAppLayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  layout?: {
    layoutId?: string(name='LayoutId', description='This parameter is required.', example='167466539798442****'),
  }(name='Layout'),
}

model DeleteAppLayoutShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  layoutShrink?: string(name='Layout'),
}

model DeleteAppLayoutResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='2DCE8D7E-BE3B-54AB-8DAC-32F34BED0763'),
}

model DeleteAppLayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppLayoutResponseBody(name='body'),
}

/**
 * @summary 删除app自定义布局
 *
 * @param tmpReq DeleteAppLayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppLayoutResponse
 */
async function deleteAppLayoutWithOptions(tmpReq: DeleteAppLayoutRequest, runtime: $RuntimeOptions): DeleteAppLayoutResponse {
  tmpReq.validate();
  var request = new DeleteAppLayoutShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layout)) {
    request.layoutShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layout, 'Layout', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.layoutShrink)) {
    query['Layout'] = request.layoutShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteAppLayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除app自定义布局
 *
 * @param request DeleteAppLayoutRequest
 * @return DeleteAppLayoutResponse
 */
async function deleteAppLayout(request: DeleteAppLayoutRequest): DeleteAppLayoutResponse {
  var runtime = new $RuntimeOptions{};
  return deleteAppLayoutWithOptions(request, runtime);
}

model DeleteAppRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  template?: {
    templateId?: string(name='TemplateId', description='This parameter is required.', example='2xh6****'),
  }(name='Template', description='This parameter is required.'),
}

model DeleteAppRecordTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  templateShrink?: string(name='Template', description='This parameter is required.'),
}

model DeleteAppRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DeleteAppRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppRecordTemplateResponseBody(name='body'),
}

/**
 * @summary 删除应用录制模版
 *
 * @param tmpReq DeleteAppRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppRecordTemplateResponse
 */
async function deleteAppRecordTemplateWithOptions(tmpReq: DeleteAppRecordTemplateRequest, runtime: $RuntimeOptions): DeleteAppRecordTemplateResponse {
  tmpReq.validate();
  var request = new DeleteAppRecordTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.template)) {
    request.templateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.template, 'Template', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.templateShrink)) {
    query['Template'] = request.templateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteAppRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除应用录制模版
 *
 * @param request DeleteAppRecordTemplateRequest
 * @return DeleteAppRecordTemplateResponse
 */
async function deleteAppRecordTemplate(request: DeleteAppRecordTemplateRequest): DeleteAppRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return deleteAppRecordTemplateWithOptions(request, runtime);
}

model DeleteAppStreamingOutTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='wv7N****'),
  streamingOutTemplate?: {
    templateId?: string(name='TemplateId', description='This parameter is required.', example='xd4c****'),
  }(name='StreamingOutTemplate', description='This parameter is required.'),
}

model DeleteAppStreamingOutTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='wv7N****'),
  streamingOutTemplateShrink?: string(name='StreamingOutTemplate', description='This parameter is required.'),
}

model DeleteAppStreamingOutTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='30D41049-D02D-1C21-86AE-B3E5FD825C17'),
}

model DeleteAppStreamingOutTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAppStreamingOutTemplateResponseBody(name='body'),
}

/**
 * @summary 删除应用推流模版
 *
 * @param tmpReq DeleteAppStreamingOutTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAppStreamingOutTemplateResponse
 */
async function deleteAppStreamingOutTemplateWithOptions(tmpReq: DeleteAppStreamingOutTemplateRequest, runtime: $RuntimeOptions): DeleteAppStreamingOutTemplateResponse {
  tmpReq.validate();
  var request = new DeleteAppStreamingOutTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.streamingOutTemplate)) {
    request.streamingOutTemplateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.streamingOutTemplate, 'StreamingOutTemplate', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.streamingOutTemplateShrink)) {
    query['StreamingOutTemplate'] = request.streamingOutTemplateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteAppStreamingOutTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除应用推流模版
 *
 * @param request DeleteAppStreamingOutTemplateRequest
 * @return DeleteAppStreamingOutTemplateResponse
 */
async function deleteAppStreamingOutTemplate(request: DeleteAppStreamingOutTemplateRequest): DeleteAppStreamingOutTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return deleteAppStreamingOutTemplateWithOptions(request, runtime);
}

model DeleteAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  ownerId?: long(name='OwnerId'),
  ruleId?: long(name='RuleId', description='This parameter is required.', example='12'),
}

model DeleteAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model DeleteAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request DeleteAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAutoLiveStreamRuleResponse
 */
async function deleteAutoLiveStreamRuleWithOptions(request: DeleteAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): DeleteAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteAutoLiveStreamRuleRequest
 * @return DeleteAutoLiveStreamRuleResponse
 */
async function deleteAutoLiveStreamRule(request: DeleteAutoLiveStreamRuleRequest): DeleteAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return deleteAutoLiveStreamRuleWithOptions(request, runtime);
}

model DeleteChannelRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  ownerId?: long(name='OwnerId'),
}

model DeleteChannelResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
}

model DeleteChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteChannelResponseBody(name='body'),
}

/**
 * @param request DeleteChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteChannelResponse
 */
async function deleteChannelWithOptions(request: DeleteChannelRequest, runtime: $RuntimeOptions): DeleteChannelResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteChannel',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteChannelRequest
 * @return DeleteChannelResponse
 */
async function deleteChannel(request: DeleteChannelRequest): DeleteChannelResponse {
  var runtime = new $RuntimeOptions{};
  return deleteChannelWithOptions(request, runtime);
}

model DeleteEventSubscribeRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='9qb1****'),
  ownerId?: long(name='OwnerId'),
  subscribeId?: string(name='SubscribeId', description='This parameter is required.', example='ad53276431c****'),
}

model DeleteEventSubscribeResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model DeleteEventSubscribeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteEventSubscribeResponseBody(name='body'),
}

/**
 * @param request DeleteEventSubscribeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteEventSubscribeResponse
 */
async function deleteEventSubscribeWithOptions(request: DeleteEventSubscribeRequest, runtime: $RuntimeOptions): DeleteEventSubscribeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.subscribeId)) {
    query['SubscribeId'] = request.subscribeId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteEventSubscribe',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteEventSubscribeRequest
 * @return DeleteEventSubscribeResponse
 */
async function deleteEventSubscribe(request: DeleteEventSubscribeRequest): DeleteEventSubscribeResponse {
  var runtime = new $RuntimeOptions{};
  return deleteEventSubscribeWithOptions(request, runtime);
}

model DeleteMPULayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  layoutId?: long(name='LayoutId', description='This parameter is required.', example='2'),
  ownerId?: long(name='OwnerId'),
}

model DeleteMPULayoutResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model DeleteMPULayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteMPULayoutResponseBody(name='body'),
}

/**
 * @param request DeleteMPULayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteMPULayoutResponse
 */
async function deleteMPULayoutWithOptions(request: DeleteMPULayoutRequest, runtime: $RuntimeOptions): DeleteMPULayoutResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteMPULayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteMPULayoutRequest
 * @return DeleteMPULayoutResponse
 */
async function deleteMPULayout(request: DeleteMPULayoutRequest): DeleteMPULayoutResponse {
  var runtime = new $RuntimeOptions{};
  return deleteMPULayoutWithOptions(request, runtime);
}

model DeleteRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  ownerId?: long(name='OwnerId', description='1'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='76dasgb****'),
}

model DeleteRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model DeleteRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRecordTemplateResponseBody(name='body'),
}

/**
 * @param request DeleteRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRecordTemplateResponse
 */
async function deleteRecordTemplateWithOptions(request: DeleteRecordTemplateRequest, runtime: $RuntimeOptions): DeleteRecordTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteRecordTemplateRequest
 * @return DeleteRecordTemplateResponse
 */
async function deleteRecordTemplate(request: DeleteRecordTemplateRequest): DeleteRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRecordTemplateWithOptions(request, runtime);
}

model DescribeAllCallbackResponseBody = {
  callbacks?: [ 
    {
      category?: string(name='Category', example='RecordEvent'),
      name?: string(name='Name', example='录制回调'),
      subEvent?: [ 
        {
          event?: int32(name='Event', example='2000'),
          eventName?: string(name='EventName', example='录制开始'),
          type?: int32(name='Type', example='0'),
        }
      ](name='SubEvent'),
    }
  ](name='Callbacks'),
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeAllCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAllCallbackResponseBody(name='body'),
}

/**
 * @summary 列出系统支持的事件回调
 *
 * @param request DescribeAllCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAllCallbackResponse
 */
async function describeAllCallbackWithOptions(runtime: $RuntimeOptions): DescribeAllCallbackResponse {
  var req = new OpenApiUtil.OpenApiRequest{};
  var params = new OpenApiUtil.Params{
    action = 'DescribeAllCallback',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 列出系统支持的事件回调
 *
 * @return DescribeAllCallbackResponse
 */
async function describeAllCallback(): DescribeAllCallbackResponse {
  var runtime = new $RuntimeOptions{};
  return describeAllCallbackWithOptions(runtime);
}

model DescribeAppCallStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
}

model DescribeAppCallStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='20A6D1E3-1F5F-5440-A4F1-EC7831646FE4'),
  result?: string(name='Result', example='enable'),
}

model DescribeAppCallStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppCallStatusResponseBody(name='body'),
}

/**
 * @summary 查看app回调开关
 *
 * @param request DescribeAppCallStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppCallStatusResponse
 */
async function describeAppCallStatusWithOptions(request: DescribeAppCallStatusRequest, runtime: $RuntimeOptions): DescribeAppCallStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppCallStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看app回调开关
 *
 * @param request DescribeAppCallStatusRequest
 * @return DescribeAppCallStatusResponse
 */
async function describeAppCallStatus(request: DescribeAppCallStatusRequest): DescribeAppCallStatusResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppCallStatusWithOptions(request, runtime);
}

model DescribeAppCallbackSecretKeyRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='9qb1****'),
}

model DescribeAppCallbackSecretKeyResponseBody = {
  callbackSecretKey?: string(name='CallbackSecretKey', example='a656b296a30xxxxxxxxxx1cd4'),
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeAppCallbackSecretKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppCallbackSecretKeyResponseBody(name='body'),
}

/**
 * @summary 获取app回调密钥
 *
 * @param request DescribeAppCallbackSecretKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppCallbackSecretKeyResponse
 */
async function describeAppCallbackSecretKeyWithOptions(request: DescribeAppCallbackSecretKeyRequest, runtime: $RuntimeOptions): DescribeAppCallbackSecretKeyResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppCallbackSecretKey',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取app回调密钥
 *
 * @param request DescribeAppCallbackSecretKeyRequest
 * @return DescribeAppCallbackSecretKeyResponse
 */
async function describeAppCallbackSecretKey(request: DescribeAppCallbackSecretKeyRequest): DescribeAppCallbackSecretKeyResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppCallbackSecretKeyWithOptions(request, runtime);
}

model DescribeAppKeyRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='0cho****'),
  ownerId?: long(name='OwnerId'),
}

model DescribeAppKeyResponseBody = {
  appKey?: string(name='AppKey', description='AppKey。', example='ba133b2cee4ab9be424674892c33****'),
  requestId?: string(name='RequestId', example='154EF5DE-3D08-1F2C-A482-281F78D74B7C'),
}

model DescribeAppKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppKeyResponseBody(name='body'),
}

/**
 * @summary 查看AppKey
 *
 * @param request DescribeAppKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppKeyResponse
 */
async function describeAppKeyWithOptions(request: DescribeAppKeyRequest, runtime: $RuntimeOptions): DescribeAppKeyResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppKey',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看AppKey
 *
 * @param request DescribeAppKeyRequest
 * @return DescribeAppKeyResponse
 */
async function describeAppKey(request: DescribeAppKeyRequest): DescribeAppKeyResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppKeyWithOptions(request, runtime);
}

model DescribeAppLayoutsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  condition?: {
    layoutId?: string(name='LayoutId', example='167466539798442****'),
    name?: string(name='Name', example='测试'),
  }(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppLayoutsShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  conditionShrink?: string(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppLayoutsResponseBody = {
  layouts?: [ 
    {
      layoutId?: string(name='LayoutId', example='167466539798442****'),
      name?: string(name='Name', example='测试'),
      panes?: [ 
        {
          height?: float(name='Height', example='0.25'),
          paneId?: int32(name='PaneId', example='0'),
          width?: float(name='Width', example='0.25'),
          x?: float(name='X', example='0.25'),
          y?: float(name='Y', example='0.25'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Panes'),
    }
  ](name='Layouts'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  totalNum?: long(name='TotalNum', example='10'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeAppLayoutsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppLayoutsResponseBody(name='body'),
}

/**
 * @summary 查询app自定义布局
 *
 * @param tmpReq DescribeAppLayoutsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppLayoutsResponse
 */
async function describeAppLayoutsWithOptions(tmpReq: DescribeAppLayoutsRequest, runtime: $RuntimeOptions): DescribeAppLayoutsResponse {
  tmpReq.validate();
  var request = new DescribeAppLayoutsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.condition)) {
    request.conditionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.condition, 'Condition', 'json');
  }
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppLayouts',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询app自定义布局
 *
 * @param request DescribeAppLayoutsRequest
 * @return DescribeAppLayoutsResponse
 */
async function describeAppLayouts(request: DescribeAppLayoutsRequest): DescribeAppLayoutsResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppLayoutsWithOptions(request, runtime);
}

model DescribeAppLiveStreamStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
}

model DescribeAppLiveStreamStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  result?: string(name='Result', example='disable'),
}

model DescribeAppLiveStreamStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppLiveStreamStatusResponseBody(name='body'),
}

/**
 * @summary 查看应用旁路开关
 *
 * @param request DescribeAppLiveStreamStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppLiveStreamStatusResponse
 */
async function describeAppLiveStreamStatusWithOptions(request: DescribeAppLiveStreamStatusRequest, runtime: $RuntimeOptions): DescribeAppLiveStreamStatusResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppLiveStreamStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看应用旁路开关
 *
 * @param request DescribeAppLiveStreamStatusRequest
 * @return DescribeAppLiveStreamStatusResponse
 */
async function describeAppLiveStreamStatus(request: DescribeAppLiveStreamStatusRequest): DescribeAppLiveStreamStatusResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppLiveStreamStatusWithOptions(request, runtime);
}

model DescribeAppRecordStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
}

model DescribeAppRecordStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  result?: string(name='Result', example='disable'),
}

model DescribeAppRecordStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppRecordStatusResponseBody(name='body'),
}

/**
 * @summary 查询应用录制开关
 *
 * @param request DescribeAppRecordStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppRecordStatusResponse
 */
async function describeAppRecordStatusWithOptions(request: DescribeAppRecordStatusRequest, runtime: $RuntimeOptions): DescribeAppRecordStatusResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppRecordStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询应用录制开关
 *
 * @param request DescribeAppRecordStatusRequest
 * @return DescribeAppRecordStatusResponse
 */
async function describeAppRecordStatus(request: DescribeAppRecordStatusRequest): DescribeAppRecordStatusResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppRecordStatusWithOptions(request, runtime);
}

model DescribeAppRecordTemplatesRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  condition?: {
    name?: string(name='Name', example='测试'),
    templateId?: string(name='TemplateId', example='ac7N****'),
  }(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppRecordTemplatesShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='123e4567-e89b-12d3-a456-42665544****'),
  conditionShrink?: string(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppRecordTemplatesResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='2A7497D0-BEAE-58E7-B13A-751BD8EAE4C6'),
  templates?: [ 
    {
      createTime?: string(name='CreateTime', example='2020-09-04T06:22:15Z'),
      delayStopTime?: long(name='DelayStopTime', example='180'),
      filePrefix?: string(name='FilePrefix', example='record/{AppId}/{ChannelId_TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
      fileSplitInterval?: long(name='FileSplitInterval', example='1800'),
      formats?: [ string ](name='Formats'),
      layoutIds?: [ string ](name='LayoutIds'),
      mediaEncode?: int32(name='MediaEncode', example='1'),
      name?: string(name='Name', example='测试'),
      templateId?: string(name='TemplateId', example='wv7N****'),
    }
  ](name='Templates'),
  totalNum?: long(name='TotalNum', example='10'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeAppRecordTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppRecordTemplatesResponseBody(name='body'),
}

/**
 * @summary 应用录制模版列表
 *
 * @param tmpReq DescribeAppRecordTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppRecordTemplatesResponse
 */
async function describeAppRecordTemplatesWithOptions(tmpReq: DescribeAppRecordTemplatesRequest, runtime: $RuntimeOptions): DescribeAppRecordTemplatesResponse {
  tmpReq.validate();
  var request = new DescribeAppRecordTemplatesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.condition)) {
    request.conditionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.condition, 'Condition', 'json');
  }
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppRecordTemplates',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 应用录制模版列表
 *
 * @param request DescribeAppRecordTemplatesRequest
 * @return DescribeAppRecordTemplatesResponse
 */
async function describeAppRecordTemplates(request: DescribeAppRecordTemplatesRequest): DescribeAppRecordTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppRecordTemplatesWithOptions(request, runtime);
}

model DescribeAppRecordingFilesRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', example='1712376532000'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTs?: long(name='StartTs', example='1712376032000'),
  taskIds?: [ string ](name='TaskIds'),
}

model DescribeAppRecordingFilesShrinkRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', example='1712376532000'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTs?: long(name='StartTs', example='1712376032000'),
  taskIdsShrink?: string(name='TaskIds'),
}

model DescribeAppRecordingFilesResponseBody = {
  items?: [ 
    {
      bucket?: string(name='Bucket', example='rtc-bucket'),
      channelId?: string(name='ChannelId', example='testchannelId'),
      fileCreateTs?: long(name='FileCreateTs', example='1712376032000'),
      fileDuration?: int32(name='FileDuration', example='200'),
      filePath?: string(name='FilePath', example='record/appid/12_task_local1/1712279809158_1712279844691/playlist.mp4'),
      fileSize?: int32(name='FileSize', example='10000'),
      region?: int32(name='Region', example='1'),
      startTs?: long(name='StartTs', example='1712376012000'),
      taskId?: string(name='TaskId', example='test001'),
      vendor?: int32(name='Vendor', example='1'),
    }
  ](name='Items'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  totalCnt?: int32(name='TotalCnt', example='10'),
}

model DescribeAppRecordingFilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppRecordingFilesResponseBody(name='body'),
}

/**
 * @summary 查询录制列表
 *
 * @param tmpReq DescribeAppRecordingFilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppRecordingFilesResponse
 */
async function describeAppRecordingFilesWithOptions(tmpReq: DescribeAppRecordingFilesRequest, runtime: $RuntimeOptions): DescribeAppRecordingFilesResponse {
  tmpReq.validate();
  var request = new DescribeAppRecordingFilesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.taskIds)) {
    request.taskIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.taskIds, 'TaskIds', 'json');
  }
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppRecordingFiles',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询录制列表
 *
 * @param request DescribeAppRecordingFilesRequest
 * @return DescribeAppRecordingFilesResponse
 */
async function describeAppRecordingFiles(request: DescribeAppRecordingFilesRequest): DescribeAppRecordingFilesResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppRecordingFilesWithOptions(request, runtime);
}

model DescribeAppStreamingOutTemplatesRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ioeh****'),
  condition?: {
    name?: string(name='Name', example='测试'),
    templateId?: string(name='TemplateId', example='Bj6D****'),
  }(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppStreamingOutTemplatesShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ioeh****'),
  conditionShrink?: string(name='Condition'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeAppStreamingOutTemplatesResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='B0A2FCBC-43A4-428F-BC1D-3F4F85837F76'),
  templates?: [ 
    {
      createTime?: string(name='CreateTime', example='2020-09-04T06:22:15Z'),
      layoutIds?: [ string ](name='LayoutIds'),
      mediaEncode?: int32(name='MediaEncode', example='1'),
      name?: string(name='Name', example='模版名称'),
      templateId?: string(name='TemplateId', example='Bj6D****'),
    }
  ](name='Templates'),
  totalNum?: long(name='TotalNum', example='10'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeAppStreamingOutTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppStreamingOutTemplatesResponseBody(name='body'),
}

/**
 * @summary 应用推流模版列表
 *
 * @param tmpReq DescribeAppStreamingOutTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppStreamingOutTemplatesResponse
 */
async function describeAppStreamingOutTemplatesWithOptions(tmpReq: DescribeAppStreamingOutTemplatesRequest, runtime: $RuntimeOptions): DescribeAppStreamingOutTemplatesResponse {
  tmpReq.validate();
  var request = new DescribeAppStreamingOutTemplatesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.condition)) {
    request.conditionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.condition, 'Condition', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.conditionShrink)) {
    query['Condition'] = request.conditionShrink;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAppStreamingOutTemplates',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 应用推流模版列表
 *
 * @param request DescribeAppStreamingOutTemplatesRequest
 * @return DescribeAppStreamingOutTemplatesResponse
 */
async function describeAppStreamingOutTemplates(request: DescribeAppStreamingOutTemplatesRequest): DescribeAppStreamingOutTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppStreamingOutTemplatesWithOptions(request, runtime);
}

model DescribeAppsRequest {
  appId?: string(name='AppId', example='yourAppId'),
  appVersion?: string(name='AppVersion', example='3.0'),
  order?: string(name='Order', example='asc'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='2'),
  status?: string(name='Status', example='1'),
}

model DescribeAppsResponseBody = {
  appList?: {
    app?: [ 
    {
      appId?: string(name='AppId', example='rgf1****"'),
      appName?: string(name='AppName', example='Default AppName'),
      appType?: string(name='AppType', example='universal'),
      billType?: string(name='BillType', example='paybyduration'),
      createTime?: string(name='CreateTime', example='2020-01-09T02:02:29Z'),
      serviceAreas?: {
        serviceArea?: [ string ](name='ServiceArea')
      }(name='ServiceAreas'),
      status?: int32(name='Status', example='1'),
      version?: string(name='Version'),
    }
  ](name='App')
  }(name='AppList'),
  requestId?: string(name='RequestId', example='6159ba01-6687-4fb2-a831-f0cd8d188648'),
  totalNum?: int32(name='TotalNum', example='1'),
  totalPage?: int32(name='TotalPage', example='1'),
}

model DescribeAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAppsResponseBody(name='body'),
}

/**
 * @summary App列表
 *
 * @param request DescribeAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAppsResponse
 */
async function describeAppsWithOptions(request: DescribeAppsRequest, runtime: $RuntimeOptions): DescribeAppsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.appVersion)) {
    query['AppVersion'] = request.appVersion;
  }
  if (!$isNull(request.order)) {
    query['Order'] = request.order;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeApps',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary App列表
 *
 * @param request DescribeAppsRequest
 * @return DescribeAppsResponse
 */
async function describeApps(request: DescribeAppsRequest): DescribeAppsResponse {
  var runtime = new $RuntimeOptions{};
  return describeAppsWithOptions(request, runtime);
}

model DescribeAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  ownerId?: long(name='OwnerId'),
}

model DescribeAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='069BCB66-CD80-11E8-A82B-A70F78BBDC00'),
  rules?: [ 
    {
      callBack?: string(name='CallBack', example='http://example.com/callBack'),
      channelIdPrefixes?: [ string ](name='ChannelIdPrefixes'),
      channelIds?: [ string ](name='ChannelIds'),
      createTime?: string(name='CreateTime', example='2021-08-19T02:53:07Z'),
      mediaEncode?: int32(name='MediaEncode', example='20'),
      playDomain?: string(name='PlayDomain', example='rtmp://${domain}/${app}/${stream}'),
      ruleId?: long(name='RuleId', example='12'),
      ruleName?: string(name='RuleName', example='testRule'),
      status?: string(name='Status', example='disable'),
    }
  ](name='Rules'),
}

model DescribeAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request DescribeAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAutoLiveStreamRuleResponse
 */
async function describeAutoLiveStreamRuleWithOptions(request: DescribeAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): DescribeAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeAutoLiveStreamRuleRequest
 * @return DescribeAutoLiveStreamRuleResponse
 */
async function describeAutoLiveStreamRule(request: DescribeAutoLiveStreamRuleRequest): DescribeAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return describeAutoLiveStreamRuleWithOptions(request, runtime);
}

model DescribeCallRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  extDataType?: string(name='ExtDataType', example='USER_DURATION_STAT'),
  queryExpInfo?: boolean(name='QueryExpInfo', example='false'),
}

model DescribeCallResponseBody = {
  callInfo?: {
    appId?: string(name='AppId', description='App ID。', example='xxxxxxxx'),
    callStatus?: string(name='CallStatus', example='IN'),
    channelId?: string(name='ChannelId', example='123456'),
    createdTs?: long(name='CreatedTs', example='1615860711'),
    destroyedTs?: long(name='DestroyedTs', example='1615860811'),
    duration?: long(name='Duration', example='100'),
  }(name='CallInfo'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  userDetailList?: [ 
    {
      callExp?: string(name='CallExp', example='GOOD'),
      createdTs?: long(name='CreatedTs', example='1614936817'),
      destroyedTs?: long(name='DestroyedTs', example='1614936817'),
      durMetricStatData?: {
        pubAudio?: long(name='PubAudio', example='0'),
        pubVideo1080?: long(name='PubVideo1080', example='0'),
        pubVideo360?: long(name='PubVideo360', example='0'),
        pubVideo720?: long(name='PubVideo720', example='0'),
        pubVideoScreenShare?: long(name='PubVideoScreenShare', example='0'),
        subAudio?: long(name='SubAudio', example='0'),
        subVideo1080?: long(name='SubVideo1080', example='0'),
        subVideo360?: long(name='SubVideo360', example='0'),
        subVideo720?: long(name='SubVideo720', example='0'),
        subVideoScreenShare?: long(name='SubVideoScreenShare', example='0'),
      }(name='DurMetricStatData'),
      duration?: long(name='Duration', example='0'),
      location?: string(name='Location', example='浙江省-杭州市'),
      network?: string(name='Network', example='4G'),
      networkList?: [ string ](name='NetworkList'),
      onlineDuration?: long(name='OnlineDuration', example='0'),
      onlinePeriods?: [ 
        {
          joinTs?: long(name='JoinTs', example='1614936817'),
          leaveTs?: long(name='LeaveTs', example='1614936817'),
        }
      ](name='OnlinePeriods'),
      os?: string(name='Os', example='iOS'),
      osList?: [ string ](name='OsList'),
      roles?: [ string ](name='Roles'),
      sdkVersion?: string(name='SdkVersion', example='1.0.0'),
      sdkVersionList?: [ string ](name='SdkVersionList'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='UserDetailList'),
}

model DescribeCallResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCallResponseBody(name='body'),
}

/**
 * @summary 调用DescribeCall获取单次通信详情。
 *
 * @param request DescribeCallRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCallResponse
 */
async function describeCallWithOptions(request: DescribeCallRequest, runtime: $RuntimeOptions): DescribeCallResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.extDataType)) {
    query['ExtDataType'] = request.extDataType;
  }
  if (!$isNull(request.queryExpInfo)) {
    query['QueryExpInfo'] = request.queryExpInfo;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeCall',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeCall获取单次通信详情。
 *
 * @param request DescribeCallRequest
 * @return DescribeCallResponse
 */
async function describeCall(request: DescribeCallRequest): DescribeCallResponse {
  var runtime = new $RuntimeOptions{};
  return describeCallWithOptions(request, runtime);
}

model DescribeCallListRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  callStatus?: string(name='CallStatus', example='OUT'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', description='This parameter is required.', example='1615892596'),
  orderBy?: string(name='OrderBy', example='BAD_EXP_USER_COUNT_DESC'),
  pageNo?: int32(name='PageNo', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  queryMode?: string(name='QueryMode', example='ALL'),
  startTs?: long(name='StartTs', description='This parameter is required.', example='1615806196'),
  userId?: string(name='UserId', example='c906531af5f9****'),
}

model DescribeCallListResponseBody = {
  callList?: [ 
    {
      appId?: string(name='AppId', description='App ID。', example='9qb1****'),
      badExpUserCnt?: int32(name='BadExpUserCnt', example='0'),
      callStatus?: string(name='CallStatus', example='OUT'),
      channelId?: string(name='ChannelId', example='904'),
      createdTs?: long(name='CreatedTs', example='1614936817'),
      destroyedTs?: long(name='DestroyedTs', example='1614936817'),
      duration?: long(name='Duration', example='10'),
      userCnt?: int32(name='UserCnt', example='5'),
    }
  ](name='CallList'),
  pageNo?: int32(name='PageNo', example='2'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  totalCnt?: int32(name='TotalCnt', example='20'),
}

model DescribeCallListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCallListResponseBody(name='body'),
}

/**
 * @summary 调用DescribeCallList分页查询时间范围内创建的通信信息。
 *
 * @param request DescribeCallListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCallListResponse
 */
async function describeCallListWithOptions(request: DescribeCallListRequest, runtime: $RuntimeOptions): DescribeCallListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callStatus)) {
    query['CallStatus'] = request.callStatus;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!$isNull(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!$isNull(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.queryMode)) {
    query['QueryMode'] = request.queryMode;
  }
  if (!$isNull(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeCallList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeCallList分页查询时间范围内创建的通信信息。
 *
 * @param request DescribeCallListRequest
 * @return DescribeCallListResponse
 */
async function describeCallList(request: DescribeCallListRequest): DescribeCallListResponse {
  var runtime = new $RuntimeOptions{};
  return describeCallListWithOptions(request, runtime);
}

model DescribeCallbacksRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
}

model DescribeCallbacksResponseBody = {
  callbacks?: [ 
    {
      category?: string(name='Category', example='RecordEvent'),
      checkStatus?: string(name='CheckStatus', example='1'),
      code?: string(name='Code', example='RESPONSE_INVALID'),
      conf?: string(name='Conf', example='https://www.aliyun.com'),
      msg?: string(name='Msg', example='Success'),
      status?: int32(name='Status', example='1'),
      subEvent?: [ int32 ](name='SubEvent'),
    }
  ](name='Callbacks'),
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeCallbacksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCallbacksResponseBody(name='body'),
}

/**
 * @summary app事件回调列表
 *
 * @param request DescribeCallbacksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCallbacksResponse
 */
async function describeCallbacksWithOptions(request: DescribeCallbacksRequest, runtime: $RuntimeOptions): DescribeCallbacksResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeCallbacks',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary app事件回调列表
 *
 * @param request DescribeCallbacksRequest
 * @return DescribeCallbacksResponse
 */
async function describeCallbacks(request: DescribeCallbacksRequest): DescribeCallbacksResponse {
  var runtime = new $RuntimeOptions{};
  return describeCallbacksWithOptions(request, runtime);
}

model DescribeChannelRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
}

model DescribeChannelResponseBody = {
  channel?: {
    channelId?: string(name='ChannelId', example='testid'),
    startTime?: long(name='StartTime', example='1557909133'),
  }(name='Channel', description='channel'),
  channelExist?: boolean(name='ChannelExist'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
}

model DescribeChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelResponseBody(name='body'),
}

/**
 * @summary DescribeChannel
 *
 * @param request DescribeChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelResponse
 */
async function describeChannelWithOptions(request: DescribeChannelRequest, runtime: $RuntimeOptions): DescribeChannelResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannel',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeChannel
 *
 * @param request DescribeChannelRequest
 * @return DescribeChannelResponse
 */
async function describeChannel(request: DescribeChannelRequest): DescribeChannelResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelWithOptions(request, runtime);
}

model DescribeChannelAllUsersRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
}

model DescribeChannelAllUsersResponseBody = {
  channelExist?: boolean(name='ChannelExist'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  users?: [ 
    {
      userId?: string(name='UserId', example='1811****'),
    }
  ](name='Users'),
}

model DescribeChannelAllUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelAllUsersResponseBody(name='body'),
}

/**
 * @summary 查询频道的所有参会者
 *
 * @param request DescribeChannelAllUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelAllUsersResponse
 */
async function describeChannelAllUsersWithOptions(request: DescribeChannelAllUsersRequest, runtime: $RuntimeOptions): DescribeChannelAllUsersResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelAllUsers',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询频道的所有参会者
 *
 * @param request DescribeChannelAllUsersRequest
 * @return DescribeChannelAllUsersResponse
 */
async function describeChannelAllUsers(request: DescribeChannelAllUsersRequest): DescribeChannelAllUsersResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelAllUsersWithOptions(request, runtime);
}

model DescribeChannelAreaDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  parentArea?: string(name='ParentArea'),
}

model DescribeChannelAreaDistributionStatDataResponseBody = {
  areaStatList?: [ 
    {
      areaName?: string(name='AreaName', example='浙江省'),
      callUserCount?: int32(name='CallUserCount', example='1'),
      highQualityTransmissionRate?: string(name='HighQualityTransmissionRate', example='0.9999'),
      pubUserCount?: int32(name='PubUserCount', example='1'),
      subUserCount?: int32(name='SubUserCount', example='1'),
    }
  ](name='AreaStatList'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeChannelAreaDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelAreaDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 调用DescribeChannelAreaDistributionStatData获取频道地区分布统计数据。
 *
 * @param request DescribeChannelAreaDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelAreaDistributionStatDataResponse
 */
async function describeChannelAreaDistributionStatDataWithOptions(request: DescribeChannelAreaDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeChannelAreaDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.parentArea)) {
    query['ParentArea'] = request.parentArea;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelAreaDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeChannelAreaDistributionStatData获取频道地区分布统计数据。
 *
 * @param request DescribeChannelAreaDistributionStatDataRequest
 * @return DescribeChannelAreaDistributionStatDataResponse
 */
async function describeChannelAreaDistributionStatData(request: DescribeChannelAreaDistributionStatDataRequest): DescribeChannelAreaDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelAreaDistributionStatDataWithOptions(request, runtime);
}

model DescribeChannelDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  statDim?: string(name='StatDim', description='This parameter is required.', example='OS'),
}

model DescribeChannelDistributionStatDataResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  statList?: [ 
    {
      callUserCount?: int32(name='CallUserCount', example='1'),
      callUserRatio?: string(name='CallUserRatio', example='1.0000'),
      name?: string(name='Name', example='OS'),
    }
  ](name='StatList'),
}

model DescribeChannelDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 调用DescribeChannelDistributionStatData获取频道分布统计数据。
 *
 * @param request DescribeChannelDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelDistributionStatDataResponse
 */
async function describeChannelDistributionStatDataWithOptions(request: DescribeChannelDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeChannelDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.statDim)) {
    query['StatDim'] = request.statDim;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeChannelDistributionStatData获取频道分布统计数据。
 *
 * @param request DescribeChannelDistributionStatDataRequest
 * @return DescribeChannelDistributionStatDataResponse
 */
async function describeChannelDistributionStatData(request: DescribeChannelDistributionStatDataRequest): DescribeChannelDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelDistributionStatDataWithOptions(request, runtime);
}

model DescribeChannelOverallDataRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1615893133'),
  destroyedTs?: long(name='DestroyedTs', example='1615893757'),
}

model DescribeChannelOverallDataResponseBody = {
  callInfo?: {
    appId?: string(name='AppId', example='rjdhtnqy'),
    callStatus?: string(name='CallStatus', example='IN'),
    channelId?: string(name='ChannelId', example='123456'),
    createdTs?: long(name='CreatedTs', example='1615860711'),
    destroyedTs?: long(name='DestroyedTs', example='1615860811'),
    duration?: long(name='Duration', example='100'),
  }(name='CallInfo'),
  metricDatas?: [ 
    {
      nodes?: [ 
        {
          ext?: map[string]any(name='Ext'),
          x?: string(name='X', example='1612418625'),
          y?: string(name='Y', example='123'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='CALL_QUALITY'),
    }
  ](name='MetricDatas'),
  overallData?: {
    connAvgTime?: float(name='ConnAvgTime', example='0.5'),
    fiveSecJoinRate?: float(name='FiveSecJoinRate', example='0.91'),
    totalAudioStuckRate?: float(name='TotalAudioStuckRate', example='0.02'),
    totalVideoStuckRate?: float(name='TotalVideoStuckRate', example='0.02'),
    totalVideoVagueRate?: float(name='TotalVideoVagueRate', example='0.02'),
  }(name='OverallData'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeChannelOverallDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelOverallDataResponseBody(name='body'),
}

/**
 * @summary 调用DescribeChannelOverallData查询频道概览数据。
 *
 * @param request DescribeChannelOverallDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelOverallDataResponse
 */
async function describeChannelOverallDataWithOptions(request: DescribeChannelOverallDataRequest, runtime: $RuntimeOptions): DescribeChannelOverallDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelOverallData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeChannelOverallData查询频道概览数据。
 *
 * @param request DescribeChannelOverallDataRequest
 * @return DescribeChannelOverallDataResponse
 */
async function describeChannelOverallData(request: DescribeChannelOverallDataRequest): DescribeChannelOverallDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelOverallDataWithOptions(request, runtime);
}

model DescribeChannelParticipantsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='aec****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testId'),
  order?: string(name='Order', example='asc'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeChannelParticipantsResponseBody = {
  requestId?: string(name='RequestId', example='6159ba01-6687-4fb2-a831-f0cd8d188648'),
  timestamp?: int32(name='Timestamp', example='1557909133'),
  totalNum?: int32(name='TotalNum', example='3'),
  totalPage?: int32(name='TotalPage', example='1'),
  userList?: {
    user?: [ string ](name='User')
  }(name='UserList'),
}

model DescribeChannelParticipantsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelParticipantsResponseBody(name='body'),
}

/**
 * @param request DescribeChannelParticipantsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelParticipantsResponse
 */
async function describeChannelParticipantsWithOptions(request: DescribeChannelParticipantsRequest, runtime: $RuntimeOptions): DescribeChannelParticipantsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.order)) {
    query['Order'] = request.order;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelParticipants',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeChannelParticipantsRequest
 * @return DescribeChannelParticipantsResponse
 */
async function describeChannelParticipants(request: DescribeChannelParticipantsRequest): DescribeChannelParticipantsResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelParticipantsWithOptions(request, runtime);
}

model DescribeChannelTopPubUserListRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1615893133'),
  destroyedTs?: long(name='DestroyedTs', example='1615893757'),
}

model DescribeChannelTopPubUserListResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  topPubUserDetailList?: [ 
    {
      createdTs?: long(name='CreatedTs', example='1615893327'),
      destroyedTs?: long(name='DestroyedTs', example='1615893442'),
      duration?: long(name='Duration', example='0'),
      location?: string(name='Location', example='浙江省-杭州市'),
      onlineDuration?: long(name='OnlineDuration', example='0'),
      onlinePeriods?: [ 
        {
          joinTs?: long(name='JoinTs', example='1615893327'),
          leaveTs?: long(name='LeaveTs', example='1615893442'),
        }
      ](name='OnlinePeriods'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='TopPubUserDetailList'),
}

model DescribeChannelTopPubUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelTopPubUserListResponseBody(name='body'),
}

/**
 * @summary 调用DescribeChannelTopPubUserList获取频道内发布端的用户列表（按用户在线时长降序）。
 *
 * @param request DescribeChannelTopPubUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelTopPubUserListResponse
 */
async function describeChannelTopPubUserListWithOptions(request: DescribeChannelTopPubUserListRequest, runtime: $RuntimeOptions): DescribeChannelTopPubUserListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelTopPubUserList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeChannelTopPubUserList获取频道内发布端的用户列表（按用户在线时长降序）。
 *
 * @param request DescribeChannelTopPubUserListRequest
 * @return DescribeChannelTopPubUserListResponse
 */
async function describeChannelTopPubUserList(request: DescribeChannelTopPubUserListRequest): DescribeChannelTopPubUserListResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelTopPubUserListWithOptions(request, runtime);
}

model DescribeChannelUserRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  userId?: string(name='UserId', description='This parameter is required.', example='1811****'),
}

model DescribeChannelUserResponseBody = {
  channelExist?: boolean(name='ChannelExist'),
  inChannel?: boolean(name='InChannel'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  sessions?: [ 
    {
      joined?: long(name='Joined', example='1557909133'),
      sessionId?: string(name='SessionId', example='xa744sxx8rtobgj****'),
      userId?: string(name='UserId', example='1811****'),
    }
  ](name='Sessions'),
}

model DescribeChannelUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelUserResponseBody(name='body'),
}

/**
 * @summary DescribeChannelUser
 *
 * @param request DescribeChannelUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelUserResponse
 */
async function describeChannelUserWithOptions(request: DescribeChannelUserRequest, runtime: $RuntimeOptions): DescribeChannelUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelUser',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary DescribeChannelUser
 *
 * @param request DescribeChannelUserRequest
 * @return DescribeChannelUserResponse
 */
async function describeChannelUser(request: DescribeChannelUserRequest): DescribeChannelUserResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelUserWithOptions(request, runtime);
}

model DescribeChannelUserMetricsRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
}

model DescribeChannelUserMetricsResponseBody = {
  metricDatas?: [ 
    {
      nodes?: [ 
        {
          ext?: map[string]any(name='Ext'),
          x?: string(name='X', example='1612418625'),
          y?: string(name='Y', example='123'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='ALL_NUM'),
    }
  ](name='MetricDatas'),
  overallData?: {
    totalBadExpNum?: long(name='TotalBadExpNum', example='0'),
    totalJoinFailNum?: long(name='TotalJoinFailNum', example='0'),
    totalPubUserNum?: long(name='TotalPubUserNum', example='1'),
    totalSubUserNum?: long(name='TotalSubUserNum', example='3'),
    totalUserNum?: long(name='TotalUserNum', example='5'),
  }(name='OverallData'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeChannelUserMetricsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelUserMetricsResponseBody(name='body'),
}

/**
 * @summary 调用DescribeChannelUserMetrics查询频道总览中的用户数据。
 *
 * @param request DescribeChannelUserMetricsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelUserMetricsResponse
 */
async function describeChannelUserMetricsWithOptions(request: DescribeChannelUserMetricsRequest, runtime: $RuntimeOptions): DescribeChannelUserMetricsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelUserMetrics',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeChannelUserMetrics查询频道总览中的用户数据。
 *
 * @param request DescribeChannelUserMetricsRequest
 * @return DescribeChannelUserMetricsResponse
 */
async function describeChannelUserMetrics(request: DescribeChannelUserMetricsRequest): DescribeChannelUserMetricsResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelUserMetricsWithOptions(request, runtime);
}

model DescribeChannelUsersRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='a2hz****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeChannelUsersResponseBody = {
  channelProfile?: int32(name='ChannelProfile', example='1'),
  commTotalNum?: int32(name='CommTotalNum', example='100'),
  interactiveUserList?: [ string ](name='InteractiveUserList'),
  interactiveUserNum?: int32(name='InteractiveUserNum', example='0'),
  isChannelExist?: boolean(name='IsChannelExist', example='true'),
  liveUserList?: [ string ](name='LiveUserList'),
  liveUserNum?: int32(name='LiveUserNum', example='0'),
  requestId?: string(name='RequestId', example='6159ba01-6687-4fb2-a831-f0cd8d188648'),
  timestamp?: int32(name='Timestamp', example='1557909133'),
  userList?: [ string ](name='UserList'),
}

model DescribeChannelUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelUsersResponseBody(name='body'),
}

/**
 * @param request DescribeChannelUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelUsersResponse
 */
async function describeChannelUsersWithOptions(request: DescribeChannelUsersRequest, runtime: $RuntimeOptions): DescribeChannelUsersResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannelUsers',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeChannelUsersRequest
 * @return DescribeChannelUsersResponse
 */
async function describeChannelUsers(request: DescribeChannelUsersRequest): DescribeChannelUsersResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelUsersWithOptions(request, runtime);
}

model DescribeChannelsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeChannelsResponseBody = {
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  records?: [ string ](name='Records'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  totalCnt?: int32(name='TotalCnt', example='1'),
}

model DescribeChannelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeChannelsResponseBody(name='body'),
}

/**
 * @summary 查询在线频道列表
 *
 * @param request DescribeChannelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeChannelsResponse
 */
async function describeChannelsWithOptions(request: DescribeChannelsRequest, runtime: $RuntimeOptions): DescribeChannelsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeChannels',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询在线频道列表
 *
 * @param request DescribeChannelsRequest
 * @return DescribeChannelsResponse
 */
async function describeChannels(request: DescribeChannelsRequest): DescribeChannelsResponse {
  var runtime = new $RuntimeOptions{};
  return describeChannelsWithOptions(request, runtime);
}

model DescribeCloudNotesRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', example='1712376532000'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTs?: long(name='StartTs', example='1712376032000'),
  taskIds?: [ string ](name='TaskIds'),
}

model DescribeCloudNotesShrinkRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', example='1712376532000'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTs?: long(name='StartTs', example='1712376032000'),
  taskIdsShrink?: string(name='TaskIds'),
}

model DescribeCloudNotesResponseBody = {
  items?: [ 
    {
      autoChaptersFilePath?: string(name='AutoChaptersFilePath', example='cloudNote/ksvxxppi/88_12/autoChapters_1724914365173.json'),
      bucket?: string(name='Bucket', example='sample-bucket'),
      channelId?: string(name='ChannelId', example='testchannelId'),
      customPromptFilePath?: string(name='CustomPromptFilePath', example='cloudNote/ksvxxppi/88_12/customPrompt_1724914365173.json'),
      meetingAssistanceFilePath?: string(name='MeetingAssistanceFilePath', example='cloudNote/ksvxxppi/88_12/meetingAssistance_1724914365173.json'),
      region?: int32(name='Region', example='1'),
      serviceInspectionFilePath?: string(name='ServiceInspectionFilePath', example='cloudNote/ksvxxppi/88_12/serviceInspection_1724914365173.json'),
      startTs?: long(name='StartTs', example='1731939816837'),
      summarizationFilePath?: string(name='SummarizationFilePath', example='cloudNote/ksvxxppi/88_12/summarization_1724914365173.json'),
      taskId?: string(name='TaskId', example='test001'),
      textPolishFilePath?: string(name='TextPolishFilePath', example='cloudNote/ksvxxppi/88_12/textPolish_1724914365173.json'),
      transcriptionFilePath?: string(name='TranscriptionFilePath', example='cloudNote/ksvxxppi/88_12/transcription_1724914365173.json'),
      vendor?: int32(name='Vendor', example='1'),
    }
  ](name='Items'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', description='Id of the request', example='154EF5DE-3D08-1F2C-A482-281F78D74B7C'),
  totalCnt?: int32(name='TotalCnt', example='10'),
}

model DescribeCloudNotesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCloudNotesResponseBody(name='body'),
}

/**
 * @summary 纪要列表
 *
 * @param tmpReq DescribeCloudNotesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCloudNotesResponse
 */
async function describeCloudNotesWithOptions(tmpReq: DescribeCloudNotesRequest, runtime: $RuntimeOptions): DescribeCloudNotesResponse {
  tmpReq.validate();
  var request = new DescribeCloudNotesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.taskIds)) {
    request.taskIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.taskIds, 'TaskIds', 'json');
  }
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeCloudNotes',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 纪要列表
 *
 * @param request DescribeCloudNotesRequest
 * @return DescribeCloudNotesResponse
 */
async function describeCloudNotes(request: DescribeCloudNotesRequest): DescribeCloudNotesResponse {
  var runtime = new $RuntimeOptions{};
  return describeCloudNotesWithOptions(request, runtime);
}

model DescribeEndPointEventListRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  userIdList?: string(name='UserIdList', description='This parameter is required.', example='testuserid1,testuserid2'),
}

model DescribeEndPointEventListResponseBody = {
  nodes?: [ 
    {
      eventDataItems?: [ 
        {
          eventList?: [ 
            {
              eventName?: string(name='EventName', example='开始发布'),
              eventType?: string(name='EventType', example='USER'),
              ts?: long(name='Ts', example='1614936817'),
              tsInMs?: string(name='TsInMs', example='1614936817123'),
            }
          ](name='EventList'),
          ts?: long(name='Ts', example='1614936817'),
        }
      ](name='EventDataItems'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='Nodes'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeEndPointEventListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEndPointEventListResponseBody(name='body'),
}

/**
 * @summary 调用DescribeEndPointEventList获取端对端用户事件列表。
 *
 * @param request DescribeEndPointEventListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEndPointEventListResponse
 */
async function describeEndPointEventListWithOptions(request: DescribeEndPointEventListRequest, runtime: $RuntimeOptions): DescribeEndPointEventListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.userIdList)) {
    query['UserIdList'] = request.userIdList;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeEndPointEventList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeEndPointEventList获取端对端用户事件列表。
 *
 * @param request DescribeEndPointEventListRequest
 * @return DescribeEndPointEventListResponse
 */
async function describeEndPointEventList(request: DescribeEndPointEventListRequest): DescribeEndPointEventListResponse {
  var runtime = new $RuntimeOptions{};
  return describeEndPointEventListWithOptions(request, runtime);
}

model DescribeEndPointMetricDataRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  metrics?: string(name='Metrics', description='This parameter is required.', example='VIDEO_STUCK_CAMERA'),
  pubCallIdList?: string(name='PubCallIdList', example='testcall1,testcall2'),
  pubUserId?: string(name='PubUserId', example='testuserid'),
  subUserId?: string(name='SubUserId', example='testuserid'),
}

model DescribeEndPointMetricDataResponseBody = {
  pubMetrics?: [ 
    {
      nodes?: [ 
        {
          ext?: map[string]any(name='Ext'),
          x?: string(name='X', example='1548670257'),
          y?: string(name='Y', example='230100'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='VIDEO_STUCK_CAMERA'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='PubMetrics'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  subMetrics?: [ 
    {
      nodes?: [ 
        {
          ext?: map[string]any(name='Ext'),
          x?: string(name='X', example='1548670257'),
          y?: string(name='Y', example='230100'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='VIDEO_STUCK_CAMERA'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='SubMetrics'),
}

model DescribeEndPointMetricDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEndPointMetricDataResponseBody(name='body'),
}

/**
 * @summary 调用DescribeEndPointMetricData获取端对端指标数据。
 *
 * @param request DescribeEndPointMetricDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEndPointMetricDataResponse
 */
async function describeEndPointMetricDataWithOptions(request: DescribeEndPointMetricDataRequest, runtime: $RuntimeOptions): DescribeEndPointMetricDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.metrics)) {
    query['Metrics'] = request.metrics;
  }
  if (!$isNull(request.pubCallIdList)) {
    query['PubCallIdList'] = request.pubCallIdList;
  }
  if (!$isNull(request.pubUserId)) {
    query['PubUserId'] = request.pubUserId;
  }
  if (!$isNull(request.subUserId)) {
    query['SubUserId'] = request.subUserId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeEndPointMetricData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeEndPointMetricData获取端对端指标数据。
 *
 * @param request DescribeEndPointMetricDataRequest
 * @return DescribeEndPointMetricDataResponse
 */
async function describeEndPointMetricData(request: DescribeEndPointMetricDataRequest): DescribeEndPointMetricDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeEndPointMetricDataWithOptions(request, runtime);
}

model DescribeFaultDiagnosisFactorDistributionStatRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='0rbd****'),
  endTs?: long(name='EndTs', description='This parameter is required.', example='1615892596****'),
  startTs?: long(name='StartTs', description='This parameter is required.', example='1615892596'),
}

model DescribeFaultDiagnosisFactorDistributionStatResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  statList?: [ 
    {
      factorId?: string(name='FactorId', example='1'),
      userCount?: int32(name='UserCount', example='100'),
      userRatio?: float(name='UserRatio', example='0.9239'),
    }
  ](name='StatList'),
}

model DescribeFaultDiagnosisFactorDistributionStatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFaultDiagnosisFactorDistributionStatResponseBody(name='body'),
}

/**
 * @summary 获取异常诊断影响因素分布
 *
 * @param request DescribeFaultDiagnosisFactorDistributionStatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFaultDiagnosisFactorDistributionStatResponse
 */
async function describeFaultDiagnosisFactorDistributionStatWithOptions(request: DescribeFaultDiagnosisFactorDistributionStatRequest, runtime: $RuntimeOptions): DescribeFaultDiagnosisFactorDistributionStatResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!$isNull(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeFaultDiagnosisFactorDistributionStat',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取异常诊断影响因素分布
 *
 * @param request DescribeFaultDiagnosisFactorDistributionStatRequest
 * @return DescribeFaultDiagnosisFactorDistributionStatResponse
 */
async function describeFaultDiagnosisFactorDistributionStat(request: DescribeFaultDiagnosisFactorDistributionStatRequest): DescribeFaultDiagnosisFactorDistributionStatResponse {
  var runtime = new $RuntimeOptions{};
  return describeFaultDiagnosisFactorDistributionStatWithOptions(request, runtime);
}

model DescribeFaultDiagnosisOverallDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='4eah****'),
  endTs?: long(name='EndTs', description='This parameter is required.', example='1615910399'),
  startTs?: long(name='StartTs', description='This parameter is required.', example='1615824000'),
  statDim?: string(name='StatDim', description='This parameter is required.', example='JOIN_SLOW_USER'),
}

model DescribeFaultDiagnosisOverallDataResponseBody = {
  metricData?: {
    nodes?: [ 
      {
        ext?: map[string]any(name='Ext'),
        x?: string(name='X', example='1615824000'),
        y?: string(name='Y', example='1'),
      }
    ](name='Nodes'),
  }(name='MetricData'),
  overallData?: {
    faultUserCount?: int32(name='FaultUserCount', example='20'),
    faultUserRatio?: float(name='FaultUserRatio', example='0.1'),
    totalUserCount?: int32(name='TotalUserCount', example='40'),
  }(name='OverallData'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeFaultDiagnosisOverallDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFaultDiagnosisOverallDataResponseBody(name='body'),
}

/**
 * @summary 获取异常诊断总览数据
 *
 * @param request DescribeFaultDiagnosisOverallDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFaultDiagnosisOverallDataResponse
 */
async function describeFaultDiagnosisOverallDataWithOptions(request: DescribeFaultDiagnosisOverallDataRequest, runtime: $RuntimeOptions): DescribeFaultDiagnosisOverallDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!$isNull(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  if (!$isNull(request.statDim)) {
    query['StatDim'] = request.statDim;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeFaultDiagnosisOverallData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取异常诊断总览数据
 *
 * @param request DescribeFaultDiagnosisOverallDataRequest
 * @return DescribeFaultDiagnosisOverallDataResponse
 */
async function describeFaultDiagnosisOverallData(request: DescribeFaultDiagnosisOverallDataRequest): DescribeFaultDiagnosisOverallDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeFaultDiagnosisOverallDataWithOptions(request, runtime);
}

model DescribeFaultDiagnosisUserDetailRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='0rbd****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='311'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1615892596'),
  faultType?: string(name='FaultType', description='This parameter is required.', example='JOIN_SLOW'),
  queryCallUserInfo?: boolean(name='QueryCallUserInfo', example='true'),
  userId?: string(name='UserId', description='This parameter is required.', example='c906531af5f9****'),
}

model DescribeFaultDiagnosisUserDetailResponseBody = {
  callInfo?: {
    appId?: string(name='AppId', description='App ID。', example='0rbd****'),
    callStatus?: string(name='CallStatus', example='IN'),
    channelId?: string(name='ChannelId', example='311'),
    createdTs?: long(name='CreatedTs', example='1620957905'),
    destroyedTs?: long(name='DestroyedTs', example='1620958150'),
    duration?: long(name='Duration', example='100'),
  }(name='CallInfo'),
  factorList?: [ 
    {
      factorId?: string(name='FactorId', example='1'),
      faultSource?: string(name='FaultSource', example='LOCAL'),
      relatedEventDatas?: [ 
        {
          eventDataItems?: [ 
            {
              eventList?: [ 
                {
                  eventName?: string(name='EventName', example='开始发布'),
                  eventType?: string(name='EventType', example='USER'),
                  ts?: long(name='Ts', example='1614936817'),
                }
              ](name='EventList'),
              ts?: long(name='Ts', example='1614936817'),
            }
          ](name='EventDataItems'),
          role?: string(name='Role', example='SENDER'),
          userId?: string(name='UserId', example='0a497933****'),
        }
      ](name='RelatedEventDatas'),
      relatedMetricDatas?: [ 
        {
          nodes?: [ 
            {
              ext?: map[string]any(name='Ext'),
              x?: string(name='X', example='1615892596'),
              y?: string(name='Y', example='20'),
            }
          ](name='Nodes'),
          role?: string(name='Role', example='SENDER'),
          type?: string(name='Type', example='AUDIO_STUCK'),
          userId?: string(name='UserId', example='0a497933****'),
        }
      ](name='RelatedMetricDatas'),
    }
  ](name='FactorList'),
  faultMetricData?: {
    nodes?: [ 
      {
        x?: string(name='X', example='1620957900'),
        y?: string(name='Y', example='0.4540'),
      }
    ](name='Nodes'),
  }(name='FaultMetricData'),
  networkOperators?: [ string ](name='NetworkOperators'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  userDetail?: {
    createdTs?: long(name='CreatedTs', example='1620957919'),
    destroyedTs?: long(name='DestroyedTs', example='1620958150'),
    duration?: long(name='Duration', example='231'),
    location?: string(name='Location', example='浙江省-杭州市'),
    network?: string(name='Network', example='4G'),
    onlineDuration?: long(name='OnlineDuration', example='231'),
    onlinePeriods?: [ 
      {
        joinTs?: long(name='JoinTs', example='1620957919'),
        leaveTs?: long(name='LeaveTs', example='1620958150'),
      }
    ](name='OnlinePeriods'),
    os?: string(name='Os', example='iOS'),
    sdkVersion?: string(name='SdkVersion', example='1.0.0'),
    userId?: string(name='UserId', example='0a497933****'),
  }(name='UserDetail'),
}

model DescribeFaultDiagnosisUserDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFaultDiagnosisUserDetailResponseBody(name='body'),
}

/**
 * @summary 获取异常诊断用户详情
 *
 * @param request DescribeFaultDiagnosisUserDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFaultDiagnosisUserDetailResponse
 */
async function describeFaultDiagnosisUserDetailWithOptions(request: DescribeFaultDiagnosisUserDetailRequest, runtime: $RuntimeOptions): DescribeFaultDiagnosisUserDetailResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.faultType)) {
    query['FaultType'] = request.faultType;
  }
  if (!$isNull(request.queryCallUserInfo)) {
    query['QueryCallUserInfo'] = request.queryCallUserInfo;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeFaultDiagnosisUserDetail',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取异常诊断用户详情
 *
 * @param request DescribeFaultDiagnosisUserDetailRequest
 * @return DescribeFaultDiagnosisUserDetailResponse
 */
async function describeFaultDiagnosisUserDetail(request: DescribeFaultDiagnosisUserDetailRequest): DescribeFaultDiagnosisUserDetailResponse {
  var runtime = new $RuntimeOptions{};
  return describeFaultDiagnosisUserDetailWithOptions(request, runtime);
}

model DescribeFaultDiagnosisUserListRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='0rbd****'),
  channelId?: string(name='ChannelId', example='311'),
  endTs?: long(name='EndTs', description='This parameter is required.', example='1615892596'),
  faultTypes?: string(name='FaultTypes', example='JOIN_SLOW,AUDIO_STUCK'),
  pageNo?: int32(name='PageNo', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
  startTs?: long(name='StartTs', description='This parameter is required.', example='1615806196'),
  userId?: string(name='UserId', example='c906531af5f9****'),
}

model DescribeFaultDiagnosisUserListResponseBody = {
  pageNo?: int32(name='PageNo', example='2'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  totalCnt?: int32(name='TotalCnt', example='20'),
  userList?: [ 
    {
      channelCreatedTs?: long(name='ChannelCreatedTs', example='1614936817'),
      channelId?: string(name='ChannelId', example='904'),
      createdTs?: long(name='CreatedTs', example='1614936817'),
      destroyedTs?: long(name='DestroyedTs', example='1614936817'),
      faultList?: [ 
        {
          faultType?: string(name='FaultType', example='JOIN_SLOW'),
        }
      ](name='FaultList'),
      userId?: string(name='UserId', example='123456'),
    }
  ](name='UserList'),
}

model DescribeFaultDiagnosisUserListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFaultDiagnosisUserListResponseBody(name='body'),
}

/**
 * @summary 获取异常诊断用户明细列表
 *
 * @param request DescribeFaultDiagnosisUserListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFaultDiagnosisUserListResponse
 */
async function describeFaultDiagnosisUserListWithOptions(request: DescribeFaultDiagnosisUserListRequest, runtime: $RuntimeOptions): DescribeFaultDiagnosisUserListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!$isNull(request.faultTypes)) {
    query['FaultTypes'] = request.faultTypes;
  }
  if (!$isNull(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeFaultDiagnosisUserList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取异常诊断用户明细列表
 *
 * @param request DescribeFaultDiagnosisUserListRequest
 * @return DescribeFaultDiagnosisUserListResponse
 */
async function describeFaultDiagnosisUserList(request: DescribeFaultDiagnosisUserListRequest): DescribeFaultDiagnosisUserListResponse {
  var runtime = new $RuntimeOptions{};
  return describeFaultDiagnosisUserListWithOptions(request, runtime);
}

model DescribeMPULayoutInfoListRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  layoutId?: long(name='LayoutId', example='2'),
  name?: string(name='Name', example='LayoutName'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model DescribeMPULayoutInfoListResponseBody = {
  layouts?: {
    layout?: [ 
    {
      audioMixCount?: int32(name='AudioMixCount', example='3'),
      layoutId?: long(name='LayoutId', example='2'),
      name?: string(name='Name', example='LayoutName'),
      panes?: {
        panes?: [ 
        {
          height?: float(name='Height', example='0.5'),
          majorPane?: int32(name='MajorPane', example='0'),
          paneId?: int32(name='PaneId', example='0'),
          width?: float(name='Width', example='0.5'),
          x?: float(name='X', example='0.5'),
          y?: float(name='Y', example='0.5'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Panes')
      }(name='Panes'),
    }
  ](name='Layout')
  }(name='Layouts'),
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  totalNum?: long(name='TotalNum', example='1'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeMPULayoutInfoListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMPULayoutInfoListResponseBody(name='body'),
}

/**
 * @param request DescribeMPULayoutInfoListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMPULayoutInfoListResponse
 */
async function describeMPULayoutInfoListWithOptions(request: DescribeMPULayoutInfoListRequest, runtime: $RuntimeOptions): DescribeMPULayoutInfoListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeMPULayoutInfoList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeMPULayoutInfoListRequest
 * @return DescribeMPULayoutInfoListResponse
 */
async function describeMPULayoutInfoList(request: DescribeMPULayoutInfoListRequest): DescribeMPULayoutInfoListResponse {
  var runtime = new $RuntimeOptions{};
  return describeMPULayoutInfoListWithOptions(request, runtime);
}

model DescribePubUserListBySubUserRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  subUserId?: string(name='SubUserId', description='This parameter is required.', example='testuserid'),
}

model DescribePubUserListBySubUserResponseBody = {
  callStatus?: string(name='CallStatus', example='IN'),
  pubUserDetailList?: [ 
    {
      callIdList?: [ string ](name='CallIdList'),
      clientType?: string(name='ClientType', example='NATIVE'),
      createdTs?: long(name='CreatedTs', example='1614936817'),
      destroyedTs?: long(name='DestroyedTs', example='1614936817'),
      duration?: long(name='Duration', example='0'),
      location?: string(name='Location', example='浙江省-杭州市'),
      network?: string(name='Network', example='4G'),
      networkList?: [ string ](name='NetworkList'),
      onlineDuration?: long(name='OnlineDuration', example='0'),
      onlinePeriods?: [ 
        {
          joinTs?: long(name='JoinTs', example='1614936817'),
          leaveTs?: long(name='LeaveTs', example='1614936817'),
        }
      ](name='OnlinePeriods'),
      os?: string(name='Os', example='iOS'),
      osList?: [ string ](name='OsList'),
      roles?: [ string ](name='Roles'),
      sdkVersion?: string(name='SdkVersion', example='1.0.0'),
      sdkVersionList?: [ string ](name='SdkVersionList'),
      userId?: string(name='UserId', example='testuserid'),
      userIdAlias?: string(name='UserIdAlias', example='旁路转推'),
    }
  ](name='PubUserDetailList'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  subUserDetail?: {
    clientType?: string(name='ClientType', example='NATIVE'),
    createdTs?: long(name='CreatedTs', example='1614936817'),
    destroyedTs?: long(name='DestroyedTs', example='1614936817'),
    duration?: long(name='Duration', example='0'),
    location?: string(name='Location', example='浙江省-杭州市'),
    network?: string(name='Network', example='4G'),
    networkList?: [ string ](name='NetworkList'),
    onlineDuration?: long(name='OnlineDuration', example='0'),
    onlinePeriods?: [ 
      {
        joinTs?: long(name='JoinTs', example='1614936817'),
        leaveTs?: long(name='LeaveTs', example='1614936817'),
      }
    ](name='OnlinePeriods'),
    os?: string(name='Os', example='iOS'),
    osList?: [ string ](name='OsList'),
    roles?: [ string ](name='Roles'),
    sdkVersion?: string(name='SdkVersion', example='1.0.0'),
    sdkVersionList?: [ string ](name='SdkVersionList'),
    userId?: string(name='UserId', example='testuserid'),
    userIdAlias?: string(name='UserIdAlias', example='旁路转推'),
  }(name='SubUserDetail'),
}

model DescribePubUserListBySubUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePubUserListBySubUserResponseBody(name='body'),
}

/**
 * @summary 调用DescribePubUserListBySubUser根据订阅端获取通信中发布端用户列表。
 *
 * @param request DescribePubUserListBySubUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePubUserListBySubUserResponse
 */
async function describePubUserListBySubUserWithOptions(request: DescribePubUserListBySubUserRequest, runtime: $RuntimeOptions): DescribePubUserListBySubUserResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.subUserId)) {
    query['SubUserId'] = request.subUserId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePubUserListBySubUser',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribePubUserListBySubUser根据订阅端获取通信中发布端用户列表。
 *
 * @param request DescribePubUserListBySubUserRequest
 * @return DescribePubUserListBySubUserResponse
 */
async function describePubUserListBySubUser(request: DescribePubUserListBySubUserRequest): DescribePubUserListBySubUserResponse {
  var runtime = new $RuntimeOptions{};
  return describePubUserListBySubUserWithOptions(request, runtime);
}

model DescribeQoeMetricDataRequest {
  appId?: string(name='AppId', description='APP ID。

This parameter is required.', example='testappid'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  createdTs?: long(name='CreatedTs', description='This parameter is required.', example='1614936817'),
  destroyedTs?: long(name='DestroyedTs', example='1614936817'),
  userId?: string(name='UserId', description='This parameter is required.', example='testuserid'),
}

model DescribeQoeMetricDataResponseBody = {
  audioData?: [ 
    {
      nodes?: [ 
        {
          x?: string(name='X', example='1548670256'),
          y?: string(name='Y', example='123'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='AUDIO'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='AudioData'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  videoData?: [ 
    {
      nodes?: [ 
        {
          x?: string(name='X', example='1548670256'),
          y?: string(name='Y', example='123'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='VIDEO_CAMERA'),
      userId?: string(name='UserId', example='testuserid'),
    }
  ](name='VideoData'),
}

model DescribeQoeMetricDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQoeMetricDataResponseBody(name='body'),
}

/**
 * @summary 调用DescribeQoeMetricData获取单次通信中用户的下行体验质量指标。
 *
 * @param request DescribeQoeMetricDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQoeMetricDataResponse
 */
async function describeQoeMetricDataWithOptions(request: DescribeQoeMetricDataRequest, runtime: $RuntimeOptions): DescribeQoeMetricDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.createdTs)) {
    query['CreatedTs'] = request.createdTs;
  }
  if (!$isNull(request.destroyedTs)) {
    query['DestroyedTs'] = request.destroyedTs;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeQoeMetricData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 调用DescribeQoeMetricData获取单次通信中用户的下行体验质量指标。
 *
 * @param request DescribeQoeMetricDataRequest
 * @return DescribeQoeMetricDataResponse
 */
async function describeQoeMetricData(request: DescribeQoeMetricDataRequest): DescribeQoeMetricDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeQoeMetricDataWithOptions(request, runtime);
}

model DescribeQualityAreaDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  parentArea?: string(name='ParentArea', example='中国'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
}

model DescribeQualityAreaDistributionStatDataResponseBody = {
  qualityStatDataList?: [ 
    {
      audioDelay?: long(name='AudioDelay', example='347'),
      audioHighQualityTransmissionRate?: string(name='AudioHighQualityTransmissionRate', example='0.9933'),
      audioStuckRate?: string(name='AudioStuckRate', example='0.0021'),
      callDurationRatio?: string(name='CallDurationRatio', example='0.6654'),
      joinChannelSucFiveSecRate?: string(name='JoinChannelSucFiveSecRate', example='0.9338'),
      joinChannelSucRate?: string(name='JoinChannelSucRate', example='0.9356'),
      name?: string(name='Name', example='中国_浙江省'),
      videoDelay?: long(name='VideoDelay', example='291'),
      videoFirstPicDuration?: long(name='VideoFirstPicDuration', example='1363'),
      videoHighQualityTransmissionRate?: string(name='VideoHighQualityTransmissionRate', example='0.9967'),
      videoStuckRate?: string(name='VideoStuckRate', example='0.0058'),
    }
  ](name='QualityStatDataList'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeQualityAreaDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQualityAreaDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取质量统计区域分布统计数据
 *
 * @param request DescribeQualityAreaDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQualityAreaDistributionStatDataResponse
 */
async function describeQualityAreaDistributionStatDataWithOptions(request: DescribeQualityAreaDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeQualityAreaDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.parentArea)) {
    query['ParentArea'] = request.parentArea;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeQualityAreaDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取质量统计区域分布统计数据
 *
 * @param request DescribeQualityAreaDistributionStatDataRequest
 * @return DescribeQualityAreaDistributionStatDataResponse
 */
async function describeQualityAreaDistributionStatData(request: DescribeQualityAreaDistributionStatDataRequest): DescribeQualityAreaDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeQualityAreaDistributionStatDataWithOptions(request, runtime);
}

model DescribeQualityDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
  statDim?: string(name='StatDim', description='This parameter is required.', example='CHANNEL_ONLINE'),
}

model DescribeQualityDistributionStatDataResponseBody = {
  qualityStatDataList?: [ 
    {
      audioDelay?: long(name='AudioDelay', example='554'),
      audioHighQualityTransmissionRate?: string(name='AudioHighQualityTransmissionRate', example='0.9953'),
      audioStuckRate?: string(name='AudioStuckRate', example='0.0014'),
      callDurationRatio?: string(name='CallDurationRatio', example='1.0000'),
      joinChannelSucFiveSecRate?: string(name='JoinChannelSucFiveSecRate', example='0.9560'),
      joinChannelSucRate?: string(name='JoinChannelSucRate', example='0.9575'),
      name?: string(name='Name', example='ONE_TO_FIVE'),
      videoDelay?: long(name='VideoDelay', example='517'),
      videoFirstPicDuration?: long(name='VideoFirstPicDuration', example='1299'),
      videoHighQualityTransmissionRate?: string(name='VideoHighQualityTransmissionRate', example='0.9981'),
      videoStuckRate?: string(name='VideoStuckRate', example='0.0264'),
    }
  ](name='QualityStatDataList'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeQualityDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQualityDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取质量统计分布数据
 *
 * @param request DescribeQualityDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQualityDistributionStatDataResponse
 */
async function describeQualityDistributionStatDataWithOptions(request: DescribeQualityDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeQualityDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!$isNull(request.statDim)) {
    query['StatDim'] = request.statDim;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeQualityDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取质量统计分布数据
 *
 * @param request DescribeQualityDistributionStatDataRequest
 * @return DescribeQualityDistributionStatDataResponse
 */
async function describeQualityDistributionStatData(request: DescribeQualityDistributionStatDataRequest): DescribeQualityDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeQualityDistributionStatDataWithOptions(request, runtime);
}

model DescribeQualityOsSdkVersionDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
}

model DescribeQualityOsSdkVersionDistributionStatDataResponseBody = {
  qualityOsSdkVersionStatDataList?: [ 
    {
      audioDelay?: long(name='AudioDelay', example='248'),
      audioHighQualityTransmissionRate?: string(name='AudioHighQualityTransmissionRate', example='0.9987'),
      audioStuckRate?: string(name='AudioStuckRate', example='0.0011'),
      callDurationRatio?: string(name='CallDurationRatio', example='0.0984'),
      joinChannelSucFiveSecRate?: string(name='JoinChannelSucFiveSecRate', example='0.8276'),
      joinChannelSucRate?: string(name='JoinChannelSucRate', example='0.8276'),
      name?: string(name='Name', example='2.1.0.210316.dev--release/rtcsdk_v2.1'),
      os?: string(name='Os', example='macOS'),
      videoDelay?: long(name='VideoDelay', example='333'),
      videoFirstPicDuration?: long(name='VideoFirstPicDuration', example='5643'),
      videoHighQualityTransmissionRate?: string(name='VideoHighQualityTransmissionRate', example='0.9997'),
      videoStuckRate?: string(name='VideoStuckRate', example='0.0054'),
    }
  ](name='QualityOsSdkVersionStatDataList'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeQualityOsSdkVersionDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQualityOsSdkVersionDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取质量统计各操作系统下SDK版本分布数据
 *
 * @param request DescribeQualityOsSdkVersionDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQualityOsSdkVersionDistributionStatDataResponse
 */
async function describeQualityOsSdkVersionDistributionStatDataWithOptions(request: DescribeQualityOsSdkVersionDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeQualityOsSdkVersionDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeQualityOsSdkVersionDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取质量统计各操作系统下SDK版本分布数据
 *
 * @param request DescribeQualityOsSdkVersionDistributionStatDataRequest
 * @return DescribeQualityOsSdkVersionDistributionStatDataResponse
 */
async function describeQualityOsSdkVersionDistributionStatData(request: DescribeQualityOsSdkVersionDistributionStatDataRequest): DescribeQualityOsSdkVersionDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeQualityOsSdkVersionDistributionStatDataWithOptions(request, runtime);
}

model DescribeQualityOverallDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
  types?: string(name='Types', description='This parameter is required.', example='JOIN_CHANNEL_SUC_RATE'),
}

model DescribeQualityOverallDataResponseBody = {
  qualityOverallData?: [ 
    {
      average?: string(name='Average', example='0.9376'),
      nodes?: [ 
        {
          x?: string(name='X', example='1615831200'),
          y?: string(name='Y', example='1.0000'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='JOIN_CHANNEL_SUC_RATE'),
    }
  ](name='QualityOverallData'),
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
}

model DescribeQualityOverallDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeQualityOverallDataResponseBody(name='body'),
}

/**
 * @summary 获取质量统计概览数据
 *
 * @param request DescribeQualityOverallDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeQualityOverallDataResponse
 */
async function describeQualityOverallDataWithOptions(request: DescribeQualityOverallDataRequest, runtime: $RuntimeOptions): DescribeQualityOverallDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!$isNull(request.types)) {
    query['Types'] = request.types;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeQualityOverallData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取质量统计概览数据
 *
 * @param request DescribeQualityOverallDataRequest
 * @return DescribeQualityOverallDataResponse
 */
async function describeQualityOverallData(request: DescribeQualityOverallDataRequest): DescribeQualityOverallDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeQualityOverallDataWithOptions(request, runtime);
}

model DescribeRecordFilesRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  channelId?: string(name='ChannelId', example='yourChannelId'),
  endTime?: string(name='EndTime', example='2020-11-02T17:36:00Z'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-11-01T17:36:00Z'),
  taskIds?: [ string ](name='TaskIds', example='yourTaskId'),
}

model DescribeRecordFilesResponseBody = {
  recordFiles?: [ 
    {
      appId?: string(name='AppId', example='yourAppId'),
      channelId?: string(name='ChannelId', example='yourChannelId'),
      createTime?: string(name='CreateTime', example='2020-10-02T17:36:00Z'),
      duration?: float(name='Duration', example='1800'),
      startTime?: string(name='StartTime', example='2020-11-01T17:36:00Z'),
      stopTime?: string(name='StopTime', example='2020-11-02T17:36:00Z'),
      taskId?: string(name='TaskId', example='yourTaskId'),
      url?: string(name='Url'),
    }
  ](name='RecordFiles'),
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b****'),
  totalNum?: long(name='TotalNum', example='1'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeRecordFilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecordFilesResponseBody(name='body'),
}

/**
 * @param request DescribeRecordFilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecordFilesResponse
 */
async function describeRecordFilesWithOptions(request: DescribeRecordFilesRequest, runtime: $RuntimeOptions): DescribeRecordFilesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.taskIds)) {
    query['TaskIds'] = request.taskIds;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRecordFiles',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRecordFilesRequest
 * @return DescribeRecordFilesResponse
 */
async function describeRecordFiles(request: DescribeRecordFilesRequest): DescribeRecordFilesResponse {
  var runtime = new $RuntimeOptions{};
  return describeRecordFilesWithOptions(request, runtime);
}

model DescribeRecordTemplatesRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  ownerId?: long(name='OwnerId', description='1'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  templateIds?: [ string ](name='TemplateIds', example='76dasgb****'),
}

model DescribeRecordTemplatesResponseBody = {
  requestId?: string(name='RequestId', example='C292B80E-5175-4BA4-8CC292B80E-5175-4BA4-8C1E-2ABEC4D7C2FE1E-2ABEC4D7****'),
  templates?: [ 
    {
      backgroundColor?: int32(name='BackgroundColor', example='0'),
      backgrounds?: [ 
        {
          display?: int32(name='Display', example='0'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Backgrounds'),
      clockWidgets?: [ 
        {
          fontColor?: int32(name='FontColor', example='0'),
          fontSize?: int32(name='FontSize', example='1'),
          fontType?: int32(name='FontType', example='0'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='ClockWidgets'),
      createTime?: string(name='CreateTime', example='2020-09-04T06:22:15Z'),
      delayStopTime?: int32(name='DelayStopTime', example='180'),
      enableM3u8DateTime?: boolean(name='EnableM3u8DateTime', example='false'),
      fileSplitInterval?: int32(name='FileSplitInterval', example='1800'),
      formats?: [ string ](name='Formats'),
      httpCallbackUrl?: string(name='HttpCallbackUrl', example='http://example.com/callback'),
      layoutIds?: [ long ](name='LayoutIds'),
      mediaEncode?: int32(name='MediaEncode', example='50'),
      mnsQueue?: string(name='MnsQueue', example='record-callback-queue'),
      name?: string(name='Name'),
      ossBucket?: string(name='OssBucket', example='rtc-record-oss'),
      ossFilePrefix?: string(name='OssFilePrefix', example='record/pre/{AppId}/{ChannelId_TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
      taskProfile?: string(name='TaskProfile', example='4IN_1080P'),
      templateId?: string(name='TemplateId', example='1ca698e2-57fa-4314-8e11-00d950d4****'),
      watermarks?: [ 
        {
          alpha?: float(name='Alpha', example='0'),
          display?: int32(name='Display', example='0'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Watermarks'),
    }
  ](name='Templates'),
  totalNum?: long(name='TotalNum', example='1'),
  totalPage?: long(name='TotalPage', example='1'),
}

model DescribeRecordTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecordTemplatesResponseBody(name='body'),
}

/**
 * @param request DescribeRecordTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecordTemplatesResponse
 */
async function describeRecordTemplatesWithOptions(request: DescribeRecordTemplatesRequest, runtime: $RuntimeOptions): DescribeRecordTemplatesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.templateIds)) {
    query['TemplateIds'] = request.templateIds;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRecordTemplates',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRecordTemplatesRequest
 * @return DescribeRecordTemplatesResponse
 */
async function describeRecordTemplates(request: DescribeRecordTemplatesRequest): DescribeRecordTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return describeRecordTemplatesWithOptions(request, runtime);
}

model DescribeRtcChannelListRequest {
  appId?: string(name='AppId', example='aoe****'),
  channelId?: string(name='ChannelId', example='testChannel'),
  ownerId?: long(name='OwnerId'),
  pageNo?: long(name='PageNo', description='This parameter is required.', example='1'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='20'),
  serviceArea?: string(name='ServiceArea', example='cn'),
  sortType?: string(name='SortType', example='desc'),
  timePoint?: string(name='TimePoint', description='This parameter is required.', example='2018-01-29T00:00:00Z'),
  userId?: string(name='UserId', example='testUser'),
}

model DescribeRtcChannelListResponseBody = {
  channelList?: {
    channelList?: [ 
    {
      callArea?: {
        callArea?: [ string ](name='CallArea')
      }(name='CallArea'),
      channelId?: string(name='ChannelId', example='testChannel'),
      endTime?: string(name='EndTime', example='2018-01-29T02:00:00Z'),
      startTime?: string(name='StartTime', example='2018-01-29T01:00:00Z'),
      totalUserCnt?: long(name='TotalUserCnt', example='2'),
    }
  ](name='ChannelList')
  }(name='ChannelList'),
  pageNo?: long(name='PageNo', example='1'),
  pageSize?: long(name='PageSize', example='100'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  totalCnt?: long(name='TotalCnt', example='1000'),
}

model DescribeRtcChannelListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRtcChannelListResponseBody(name='body'),
}

/**
 * @param request DescribeRtcChannelListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRtcChannelListResponse
 */
async function describeRtcChannelListWithOptions(request: DescribeRtcChannelListRequest, runtime: $RuntimeOptions): DescribeRtcChannelListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!$isNull(request.sortType)) {
    query['SortType'] = request.sortType;
  }
  if (!$isNull(request.timePoint)) {
    query['TimePoint'] = request.timePoint;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRtcChannelList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRtcChannelListRequest
 * @return DescribeRtcChannelListResponse
 */
async function describeRtcChannelList(request: DescribeRtcChannelListRequest): DescribeRtcChannelListResponse {
  var runtime = new $RuntimeOptions{};
  return describeRtcChannelListWithOptions(request, runtime);
}

model DescribeRtcChannelMetricRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='aoe****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testId'),
  ownerId?: long(name='OwnerId'),
  timePoint?: string(name='TimePoint', description='This parameter is required.', example='2018-01-29T00:00:00Z'),
}

model DescribeRtcChannelMetricResponseBody = {
  channelMetricInfo?: {
    channelMetric?: {
      channelId?: string(name='ChannelId', example='example_channel'),
      endTime?: string(name='EndTime', example='2019-06-06T18:57:00Z'),
      pubUserCount?: int32(name='PubUserCount', example='10'),
      startTime?: string(name='StartTime', example='2019-06-06T17:57:00Z'),
      subUserCount?: int32(name='SubUserCount', example='25'),
      userCount?: int32(name='UserCount', example='30'),
    }(name='ChannelMetric'),
    duration?: {
      pubDuration?: {
        audio?: int32(name='Audio', example='100'),
        content?: int32(name='Content', example='100'),
        video1080?: int32(name='Video1080', example='100'),
        video360?: int32(name='Video360', example='100'),
        video720?: int32(name='Video720', example='100'),
      }(name='PubDuration'),
      subDuration?: {
        audio?: int32(name='Audio', example='100'),
        content?: int32(name='Content', example='100'),
        video1080?: int32(name='Video1080', example='100'),
        video360?: int32(name='Video360', example='100'),
        video720?: int32(name='Video720', example='100'),
      }(name='SubDuration'),
    }(name='Duration'),
  }(name='ChannelMetricInfo'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeRtcChannelMetricResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRtcChannelMetricResponseBody(name='body'),
}

/**
 * @param request DescribeRtcChannelMetricRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRtcChannelMetricResponse
 */
async function describeRtcChannelMetricWithOptions(request: DescribeRtcChannelMetricRequest, runtime: $RuntimeOptions): DescribeRtcChannelMetricResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.timePoint)) {
    query['TimePoint'] = request.timePoint;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRtcChannelMetric',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRtcChannelMetricRequest
 * @return DescribeRtcChannelMetricResponse
 */
async function describeRtcChannelMetric(request: DescribeRtcChannelMetricRequest): DescribeRtcChannelMetricResponse {
  var runtime = new $RuntimeOptions{};
  return describeRtcChannelMetricWithOptions(request, runtime);
}

model DescribeRtcDurationDataRequest {
  appId?: string(name='AppId', example='yourAppId'),
  endTime?: string(name='EndTime', example='2020-02-04T07:00:00Z'),
  interval?: string(name='Interval', example='3600'),
  ownerId?: long(name='OwnerId'),
  serviceArea?: string(name='ServiceArea', example='CN'),
  startTime?: string(name='StartTime', example='2020-02-04T05:00:00Z'),
}

model DescribeRtcDurationDataResponseBody = {
  durationDataPerInterval?: {
    durationModule?: [ 
    {
      audioDuration?: long(name='AudioDuration', example='200'),
      contentDuration?: long(name='ContentDuration', example='200'),
      timeStamp?: string(name='TimeStamp', example='2020-02-04T05:00:00Z'),
      totalDuration?: long(name='TotalDuration', example='1000'),
      v1080Duration?: long(name='V1080Duration', example='300'),
      v360Duration?: long(name='V360Duration', example='300'),
      v720Duration?: long(name='V720Duration', example='200'),
    }
  ](name='DurationModule')
  }(name='DurationDataPerInterval'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeRtcDurationDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRtcDurationDataResponseBody(name='body'),
}

/**
 * @param request DescribeRtcDurationDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRtcDurationDataResponse
 */
async function describeRtcDurationDataWithOptions(request: DescribeRtcDurationDataRequest, runtime: $RuntimeOptions): DescribeRtcDurationDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRtcDurationData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRtcDurationDataRequest
 * @return DescribeRtcDurationDataResponse
 */
async function describeRtcDurationData(request: DescribeRtcDurationDataRequest): DescribeRtcDurationDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeRtcDurationDataWithOptions(request, runtime);
}

model DescribeRtcPeakChannelCntDataRequest {
  appId?: string(name='AppId', example='yourAppId'),
  endTime?: string(name='EndTime', example='2018-01-29T00:00:00Z'),
  interval?: string(name='Interval', example='3600'),
  ownerId?: long(name='OwnerId'),
  serviceArea?: string(name='ServiceArea', example='CN'),
  startTime?: string(name='StartTime', example='2018-01-29T00:00:00Z'),
}

model DescribeRtcPeakChannelCntDataResponseBody = {
  peakChannelCntDataPerInterval?: {
    peakChannelCntModule?: [ 
    {
      activeChannelPeak?: long(name='ActiveChannelPeak', example='10'),
      activeChannelPeakTime?: string(name='ActiveChannelPeakTime', example='2018-01-29T00:01:00Z'),
      timeStamp?: string(name='TimeStamp', example='2018-01-29T00:00:00Z'),
    }
  ](name='PeakChannelCntModule')
  }(name='PeakChannelCntDataPerInterval'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model DescribeRtcPeakChannelCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRtcPeakChannelCntDataResponseBody(name='body'),
}

/**
 * @param request DescribeRtcPeakChannelCntDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRtcPeakChannelCntDataResponse
 */
async function describeRtcPeakChannelCntDataWithOptions(request: DescribeRtcPeakChannelCntDataRequest, runtime: $RuntimeOptions): DescribeRtcPeakChannelCntDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRtcPeakChannelCntData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRtcPeakChannelCntDataRequest
 * @return DescribeRtcPeakChannelCntDataResponse
 */
async function describeRtcPeakChannelCntData(request: DescribeRtcPeakChannelCntDataRequest): DescribeRtcPeakChannelCntDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeRtcPeakChannelCntDataWithOptions(request, runtime);
}

model DescribeRtcUserCntDataRequest {
  appId?: string(name='AppId', example='yourAppId'),
  endTime?: string(name='EndTime', example='2018-01-29T01:00:00Z'),
  interval?: string(name='Interval', example='3600'),
  ownerId?: long(name='OwnerId'),
  serviceArea?: string(name='ServiceArea', example='CN'),
  startTime?: string(name='StartTime', example='2018-01-29T00:00:00Z'),
}

model DescribeRtcUserCntDataResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  userCntDataPerInterval?: {
    userCntModule?: [ 
    {
      activeUserCnt?: long(name='ActiveUserCnt', example='10'),
      timeStamp?: string(name='TimeStamp', example='2018-01-29T00:00:00Z'),
    }
  ](name='UserCntModule')
  }(name='UserCntDataPerInterval'),
}

model DescribeRtcUserCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRtcUserCntDataResponseBody(name='body'),
}

/**
 * @param request DescribeRtcUserCntDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRtcUserCntDataResponse
 */
async function describeRtcUserCntDataWithOptions(request: DescribeRtcUserCntDataRequest, runtime: $RuntimeOptions): DescribeRtcUserCntDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRtcUserCntData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeRtcUserCntDataRequest
 * @return DescribeRtcUserCntDataResponse
 */
async function describeRtcUserCntData(request: DescribeRtcUserCntDataRequest): DescribeRtcUserCntDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeRtcUserCntDataWithOptions(request, runtime);
}

model DescribeStreamingOutStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='1qaz***x'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testChannel'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='taskId'),
}

model DescribeStreamingOutStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  status?: int32(name='Status', example='1'),
}

model DescribeStreamingOutStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStreamingOutStatusResponseBody(name='body'),
}

/**
 * @summary 查询旁路推流状态
 *
 * @param request DescribeStreamingOutStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeStreamingOutStatusResponse
 */
async function describeStreamingOutStatusWithOptions(request: DescribeStreamingOutStatusRequest, runtime: $RuntimeOptions): DescribeStreamingOutStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeStreamingOutStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询旁路推流状态
 *
 * @param request DescribeStreamingOutStatusRequest
 * @return DescribeStreamingOutStatusResponse
 */
async function describeStreamingOutStatus(request: DescribeStreamingOutStatusRequest): DescribeStreamingOutStatusResponse {
  var runtime = new $RuntimeOptions{};
  return describeStreamingOutStatusWithOptions(request, runtime);
}

model DescribeSystemLayoutListRequest {
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model DescribeSystemLayoutListResponseBody = {
  layouts?: {
    layout?: [ 
    {
      audioMixCount?: int32(name='AudioMixCount', description='AudioMixCount。', example='3'),
      layoutId?: long(name='LayoutId', example='22'),
      name?: string(name='Name'),
      panes?: {
        panes?: [ 
        {
          height?: float(name='Height', example='0.25'),
          majorPane?: int32(name='MajorPane', description='MajorPane。', example='0'),
          paneId?: int32(name='PaneId', example='0'),
          width?: float(name='Width', example='0.25'),
          x?: float(name='X', example='0.25'),
          y?: float(name='Y', example='0.25'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Panes')
      }(name='Panes'),
    }
  ](name='Layout')
  }(name='Layouts'),
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  totalNum?: long(name='TotalNum', example='6'),
  totalPage?: long(name='TotalPage', example='2'),
}

model DescribeSystemLayoutListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSystemLayoutListResponseBody(name='body'),
}

/**
 * @summary 系统内置布局
 *
 * @param request DescribeSystemLayoutListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSystemLayoutListResponse
 */
async function describeSystemLayoutListWithOptions(request: DescribeSystemLayoutListRequest, runtime: $RuntimeOptions): DescribeSystemLayoutListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSystemLayoutList',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 系统内置布局
 *
 * @param request DescribeSystemLayoutListRequest
 * @return DescribeSystemLayoutListResponse
 */
async function describeSystemLayoutList(request: DescribeSystemLayoutListRequest): DescribeSystemLayoutListResponse {
  var runtime = new $RuntimeOptions{};
  return describeSystemLayoutListWithOptions(request, runtime);
}

model DescribeUsageAreaDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: string(name='EndDate', description='This parameter is required.', example='1615910399'),
  parentArea?: string(name='ParentArea'),
  startDate?: string(name='StartDate', description='This parameter is required.', example='1615824000'),
}

model DescribeUsageAreaDistributionStatDataResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  usageAreaStatList?: [ 
    {
      audioCallDuration?: int32(name='AudioCallDuration', example='45'),
      name?: string(name='Name', example='中国'),
      totalCallDuration?: int32(name='TotalCallDuration', example='4821'),
      videoCallDuration?: int32(name='VideoCallDuration', example='4776'),
    }
  ](name='UsageAreaStatList'),
}

model DescribeUsageAreaDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsageAreaDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取用量统计地域分布数据
 *
 * @param request DescribeUsageAreaDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUsageAreaDistributionStatDataResponse
 */
async function describeUsageAreaDistributionStatDataWithOptions(request: DescribeUsageAreaDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeUsageAreaDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.parentArea)) {
    query['ParentArea'] = request.parentArea;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeUsageAreaDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用量统计地域分布数据
 *
 * @param request DescribeUsageAreaDistributionStatDataRequest
 * @return DescribeUsageAreaDistributionStatDataResponse
 */
async function describeUsageAreaDistributionStatData(request: DescribeUsageAreaDistributionStatDataRequest): DescribeUsageAreaDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeUsageAreaDistributionStatDataWithOptions(request, runtime);
}

model DescribeUsageDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
  statDim?: string(name='StatDim', description='This parameter is required.', example='CHANNEL_ONLINE'),
}

model DescribeUsageDistributionStatDataResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  usageStatList?: [ 
    {
      audioCallDuration?: long(name='AudioCallDuration', example='51'),
      callDurationRatio?: string(name='CallDurationRatio', example='0.9782'),
      name?: string(name='Name', example='ONE_TO_FIVE'),
      totalCallDuration?: long(name='TotalCallDuration', example='10636'),
      videoCallDuration?: long(name='VideoCallDuration', example='10585'),
    }
  ](name='UsageStatList'),
}

model DescribeUsageDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsageDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取用量统计分布数据
 *
 * @param request DescribeUsageDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUsageDistributionStatDataResponse
 */
async function describeUsageDistributionStatDataWithOptions(request: DescribeUsageDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeUsageDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!$isNull(request.statDim)) {
    query['StatDim'] = request.statDim;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeUsageDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用量统计分布数据
 *
 * @param request DescribeUsageDistributionStatDataRequest
 * @return DescribeUsageDistributionStatDataResponse
 */
async function describeUsageDistributionStatData(request: DescribeUsageDistributionStatDataRequest): DescribeUsageDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeUsageDistributionStatDataWithOptions(request, runtime);
}

model DescribeUsageOsSdkVersionDistributionStatDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='0rbd****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
}

model DescribeUsageOsSdkVersionDistributionStatDataResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  usageOsSdkVersionStatList?: [ 
    {
      audioCallDuration?: long(name='AudioCallDuration', example='3'),
      callDurationRatio?: string(name='CallDurationRatio', example='0.0984'),
      name?: string(name='Name', example='1.0.0'),
      os?: string(name='Os', example='macOS'),
      totalCallDuration?: long(name='TotalCallDuration', example='476'),
      videoCallDuration?: long(name='VideoCallDuration', example='473'),
    }
  ](name='UsageOsSdkVersionStatList'),
}

model DescribeUsageOsSdkVersionDistributionStatDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsageOsSdkVersionDistributionStatDataResponseBody(name='body'),
}

/**
 * @summary 获取用量统计各操作系统下SDK版本分布数据
 *
 * @param request DescribeUsageOsSdkVersionDistributionStatDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUsageOsSdkVersionDistributionStatDataResponse
 */
async function describeUsageOsSdkVersionDistributionStatDataWithOptions(request: DescribeUsageOsSdkVersionDistributionStatDataRequest, runtime: $RuntimeOptions): DescribeUsageOsSdkVersionDistributionStatDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeUsageOsSdkVersionDistributionStatData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用量统计各操作系统下SDK版本分布数据
 *
 * @param request DescribeUsageOsSdkVersionDistributionStatDataRequest
 * @return DescribeUsageOsSdkVersionDistributionStatDataResponse
 */
async function describeUsageOsSdkVersionDistributionStatData(request: DescribeUsageOsSdkVersionDistributionStatDataRequest): DescribeUsageOsSdkVersionDistributionStatDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeUsageOsSdkVersionDistributionStatDataWithOptions(request, runtime);
}

model DescribeUsageOverallDataRequest {
  appId?: string(name='AppId', description='APP ID

This parameter is required.', example='a2hz****'),
  endDate?: long(name='EndDate', description='This parameter is required.', example='1615910399'),
  startDate?: long(name='StartDate', description='This parameter is required.', example='1615824000'),
  types?: string(name='Types', description='This parameter is required.', example='ONLINE_USER_PEAK'),
}

model DescribeUsageOverallDataResponseBody = {
  requestId?: string(name='RequestId', example='231470C1-ACFB-4C9F-844F-4CFE1E3804C5'),
  usageOverallData?: [ 
    {
      nodes?: [ 
        {
          x?: string(name='X', example='1615824000'),
          y?: string(name='Y', example='1'),
        }
      ](name='Nodes'),
      type?: string(name='Type', example='ONLINE_USER_PEAK'),
    }
  ](name='UsageOverallData'),
}

model DescribeUsageOverallDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUsageOverallDataResponseBody(name='body'),
}

/**
 * @summary 获取用量统计概览数据
 *
 * @param request DescribeUsageOverallDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUsageOverallDataResponse
 */
async function describeUsageOverallDataWithOptions(request: DescribeUsageOverallDataRequest, runtime: $RuntimeOptions): DescribeUsageOverallDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!$isNull(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!$isNull(request.types)) {
    query['Types'] = request.types;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeUsageOverallData',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用量统计概览数据
 *
 * @param request DescribeUsageOverallDataRequest
 * @return DescribeUsageOverallDataResponse
 */
async function describeUsageOverallData(request: DescribeUsageOverallDataRequest): DescribeUsageOverallDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeUsageOverallDataWithOptions(request, runtime);
}

model DescribeUserInfoInChannelRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='4eah****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='1234'),
  ownerId?: long(name='OwnerId'),
  userId?: string(name='UserId', description='This parameter is required.', example='testId'),
}

model DescribeUserInfoInChannelResponseBody = {
  isChannelExist?: boolean(name='IsChannelExist', example='true'),
  isInChannel?: boolean(name='IsInChannel', example='true'),
  property?: [ 
    {
      join?: int32(name='Join', example='1557909133'),
      role?: int32(name='Role', example='1'),
      session?: string(name='Session', example='xa744sxx8rtobgj****'),
    }
  ](name='Property'),
  requestId?: string(name='RequestId', example='6159ba01-6687-4fb2-a831-f0cd8d188648'),
  timestamp?: int32(name='Timestamp', example='1557909133'),
}

model DescribeUserInfoInChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeUserInfoInChannelResponseBody(name='body'),
}

/**
 * @param request DescribeUserInfoInChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeUserInfoInChannelResponse
 */
async function describeUserInfoInChannelWithOptions(request: DescribeUserInfoInChannelRequest, runtime: $RuntimeOptions): DescribeUserInfoInChannelResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeUserInfoInChannel',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DescribeUserInfoInChannelRequest
 * @return DescribeUserInfoInChannelResponse
 */
async function describeUserInfoInChannel(request: DescribeUserInfoInChannelRequest): DescribeUserInfoInChannelResponse {
  var runtime = new $RuntimeOptions{};
  return describeUserInfoInChannelWithOptions(request, runtime);
}

model DisableAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  ownerId?: long(name='OwnerId'),
  ruleId?: long(name='RuleId', description='This parameter is required.', example='12'),
}

model DisableAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model DisableAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisableAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request DisableAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisableAutoLiveStreamRuleResponse
 */
async function disableAutoLiveStreamRuleWithOptions(request: DisableAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): DisableAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DisableAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DisableAutoLiveStreamRuleRequest
 * @return DisableAutoLiveStreamRuleResponse
 */
async function disableAutoLiveStreamRule(request: DisableAutoLiveStreamRuleRequest): DisableAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return disableAutoLiveStreamRuleWithOptions(request, runtime);
}

model EnableAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  ownerId?: long(name='OwnerId'),
  ruleId?: long(name='RuleId', description='This parameter is required.', example='12'),
}

model EnableAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model EnableAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request EnableAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableAutoLiveStreamRuleResponse
 */
async function enableAutoLiveStreamRuleWithOptions(request: EnableAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): EnableAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'EnableAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request EnableAutoLiveStreamRuleRequest
 * @return EnableAutoLiveStreamRuleResponse
 */
async function enableAutoLiveStreamRule(request: EnableAutoLiveStreamRuleRequest): EnableAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return enableAutoLiveStreamRuleWithOptions(request, runtime);
}

model GetMPUTaskStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  ownerId?: long(name='OwnerId'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
}

model GetMPUTaskStatusResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  status?: int32(name='Status', example='0'),
}

model GetMPUTaskStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetMPUTaskStatusResponseBody(name='body'),
}

/**
 * @param request GetMPUTaskStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetMPUTaskStatusResponse
 */
async function getMPUTaskStatusWithOptions(request: GetMPUTaskStatusRequest, runtime: $RuntimeOptions): GetMPUTaskStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetMPUTaskStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetMPUTaskStatusRequest
 * @return GetMPUTaskStatusResponse
 */
async function getMPUTaskStatus(request: GetMPUTaskStatusRequest): GetMPUTaskStatusResponse {
  var runtime = new $RuntimeOptions{};
  return getMPUTaskStatusWithOptions(request, runtime);
}

model ModifyAppRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ioeh****'),
  appName?: string(name='AppName', description='This parameter is required.', example='defaultName'),
  ownerId?: long(name='OwnerId'),
}

model ModifyAppResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model ModifyAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppResponseBody(name='body'),
}

/**
 * @summary 修改App信息
 *
 * @param request ModifyAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppResponse
 */
async function modifyAppWithOptions(request: ModifyAppRequest, runtime: $RuntimeOptions): ModifyAppResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyApp',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改App信息
 *
 * @param request ModifyAppRequest
 * @return ModifyAppResponse
 */
async function modifyApp(request: ModifyAppRequest): ModifyAppResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppWithOptions(request, runtime);
}

model ModifyAppCallbackStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
}

model ModifyAppCallbackStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='F80AAC02-87BD-5D9C-B925-8AB40171BA1A'),
}

model ModifyAppCallbackStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppCallbackStatusResponseBody(name='body'),
}

/**
 * @summary 更新app回调事件开关
 *
 * @param request ModifyAppCallbackStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppCallbackStatusResponse
 */
async function modifyAppCallbackStatusWithOptions(request: ModifyAppCallbackStatusRequest, runtime: $RuntimeOptions): ModifyAppCallbackStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppCallbackStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新app回调事件开关
 *
 * @param request ModifyAppCallbackStatusRequest
 * @return ModifyAppCallbackStatusResponse
 */
async function modifyAppCallbackStatus(request: ModifyAppCallbackStatusRequest): ModifyAppCallbackStatusResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppCallbackStatusWithOptions(request, runtime);
}

model ModifyAppLayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  layout?: {
    layoutId?: string(name='LayoutId', description='This parameter is required.', example='123121231313'),
    name?: string(name='Name', description='This parameter is required.', example='测试'),
    panes?: [ 
      {
        height?: double(name='Height', example='0.25'),
        paneId?: long(name='PaneId', example='0'),
        width?: double(name='Width', example='0.25'),
        x?: double(name='X', example='0.25'),
        y?: double(name='Y', example='0.25'),
        ZOrder?: int32(name='ZOrder', example='0'),
      }
    ](name='Panes'),
  }(name='Layout', description='This parameter is required.'),
}

model ModifyAppLayoutShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  layoutShrink?: string(name='Layout', description='This parameter is required.'),
}

model ModifyAppLayoutResponseBody = {
  layoutId?: string(name='LayoutId', example='167466539798442****'),
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model ModifyAppLayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppLayoutResponseBody(name='body'),
}

/**
 * @summary 修改app自定义布局
 *
 * @param tmpReq ModifyAppLayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppLayoutResponse
 */
async function modifyAppLayoutWithOptions(tmpReq: ModifyAppLayoutRequest, runtime: $RuntimeOptions): ModifyAppLayoutResponse {
  tmpReq.validate();
  var request = new ModifyAppLayoutShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layout)) {
    request.layoutShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layout, 'Layout', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.layoutShrink)) {
    query['Layout'] = request.layoutShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppLayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改app自定义布局
 *
 * @param request ModifyAppLayoutRequest
 * @return ModifyAppLayoutResponse
 */
async function modifyAppLayout(request: ModifyAppLayoutRequest): ModifyAppLayoutResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppLayoutWithOptions(request, runtime);
}

model ModifyAppLiveStreamStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726xxxx'),
}

model ModifyAppLiveStreamStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model ModifyAppLiveStreamStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppLiveStreamStatusResponseBody(name='body'),
}

/**
 * @summary 修改应用旁路开关
 *
 * @param request ModifyAppLiveStreamStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppLiveStreamStatusResponse
 */
async function modifyAppLiveStreamStatusWithOptions(request: ModifyAppLiveStreamStatusRequest, runtime: $RuntimeOptions): ModifyAppLiveStreamStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppLiveStreamStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改应用旁路开关
 *
 * @param request ModifyAppLiveStreamStatusRequest
 * @return ModifyAppLiveStreamStatusResponse
 */
async function modifyAppLiveStreamStatus(request: ModifyAppLiveStreamStatusRequest): ModifyAppLiveStreamStatusResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppLiveStreamStatusWithOptions(request, runtime);
}

model ModifyAppRecordStatusRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726xxxx'),
}

model ModifyAppRecordStatusResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='D53303DB-AA68-5D09-90C2-A345072DCC5A'),
}

model ModifyAppRecordStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppRecordStatusResponseBody(name='body'),
}

/**
 * @summary 修改应用录制开关
 *
 * @param request ModifyAppRecordStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppRecordStatusResponse
 */
async function modifyAppRecordStatusWithOptions(request: ModifyAppRecordStatusRequest, runtime: $RuntimeOptions): ModifyAppRecordStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppRecordStatus',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改应用录制开关
 *
 * @param request ModifyAppRecordStatusRequest
 * @return ModifyAppRecordStatusResponse
 */
async function modifyAppRecordStatus(request: ModifyAppRecordStatusRequest): ModifyAppRecordStatusResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppRecordStatusWithOptions(request, runtime);
}

model ModifyAppRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  recordTemplate?: {
    delayStopTime?: int32(name='DelayStopTime', example='180'),
    filePrefix?: string(name='FilePrefix', description='This parameter is required.', example='record/{AppId}/{ChannelId}_{TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
    fileSplitInterval?: int32(name='FileSplitInterval', description='This parameter is required.', example='1800'),
    formats?: [ string ](name='Formats', description='This parameter is required.'),
    layoutIds?: [ string ](name='LayoutIds', description='This parameter is required.'),
    mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='1'),
    name?: string(name='Name', description='This parameter is required.', example='模版'),
    templateId?: string(name='TemplateId', description='This parameter is required.', example='2xh6****'),
  }(name='RecordTemplate', description='This parameter is required.'),
}

model ModifyAppRecordTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='ac7N****'),
  clientToken?: string(name='ClientToken', example='53200b81-b761-4c10-842a-a0726d97xxxx'),
  recordTemplateShrink?: string(name='RecordTemplate', description='This parameter is required.'),
}

model ModifyAppRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
}

model ModifyAppRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppRecordTemplateResponseBody(name='body'),
}

/**
 * @summary 修改应用录制模版
 *
 * @param tmpReq ModifyAppRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppRecordTemplateResponse
 */
async function modifyAppRecordTemplateWithOptions(tmpReq: ModifyAppRecordTemplateRequest, runtime: $RuntimeOptions): ModifyAppRecordTemplateResponse {
  tmpReq.validate();
  var request = new ModifyAppRecordTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.recordTemplate)) {
    request.recordTemplateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.recordTemplate, 'RecordTemplate', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.recordTemplateShrink)) {
    query['RecordTemplate'] = request.recordTemplateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改应用录制模版
 *
 * @param request ModifyAppRecordTemplateRequest
 * @return ModifyAppRecordTemplateResponse
 */
async function modifyAppRecordTemplate(request: ModifyAppRecordTemplateRequest): ModifyAppRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppRecordTemplateWithOptions(request, runtime);
}

model ModifyAppStreamingOutTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='wv7N****'),
  streamingOutTemplate?: {
    layoutIds?: [ string ](name='LayoutIds', description='This parameter is required.'),
    mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='1'),
    name?: string(name='Name', description='This parameter is required.', example='模版'),
    templateId?: string(name='TemplateId', description='This parameter is required.', example='ac7N****'),
  }(name='StreamingOutTemplate', description='This parameter is required.'),
}

model ModifyAppStreamingOutTemplateShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='wv7N****'),
  streamingOutTemplateShrink?: string(name='StreamingOutTemplate', description='This parameter is required.'),
}

model ModifyAppStreamingOutTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='30D41049-D02D-1C21-86AE-B3E5FD805C27'),
  templateId?: string(name='TemplateId', example='ac7N****'),
}

model ModifyAppStreamingOutTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAppStreamingOutTemplateResponseBody(name='body'),
}

/**
 * @summary 更新应用推流模版
 *
 * @param tmpReq ModifyAppStreamingOutTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAppStreamingOutTemplateResponse
 */
async function modifyAppStreamingOutTemplateWithOptions(tmpReq: ModifyAppStreamingOutTemplateRequest, runtime: $RuntimeOptions): ModifyAppStreamingOutTemplateResponse {
  tmpReq.validate();
  var request = new ModifyAppStreamingOutTemplateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.streamingOutTemplate)) {
    request.streamingOutTemplateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.streamingOutTemplate, 'StreamingOutTemplate', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.streamingOutTemplateShrink)) {
    query['StreamingOutTemplate'] = request.streamingOutTemplateShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyAppStreamingOutTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新应用推流模版
 *
 * @param request ModifyAppStreamingOutTemplateRequest
 * @return ModifyAppStreamingOutTemplateResponse
 */
async function modifyAppStreamingOutTemplate(request: ModifyAppStreamingOutTemplateRequest): ModifyAppStreamingOutTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return modifyAppStreamingOutTemplateWithOptions(request, runtime);
}

model ModifyCallbackMetaRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callback?: {
    category?: string(name='Category', description='This parameter is required.', example='RecordEvent'),
    conf?: string(name='Conf', description='This parameter is required.', example='https://www.aliyun.com'),
    subEvent?: [ int32 ](name='SubEvent'),
  }(name='Callback', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
}

model ModifyCallbackMetaShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callbackShrink?: string(name='Callback', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
}

model ModifyCallbackMetaResponseBody = {
  code?: string(name='Code', description='code', example='0'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='0'),
  message?: string(name='Message', description='message', example='OK'),
  requestId?: string(name='RequestId', description='requestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  success?: boolean(name='Success', description='success', example='true'),
}

model ModifyCallbackMetaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyCallbackMetaResponseBody(name='body'),
}

/**
 * @summary 更新app回调
 *
 * @param tmpReq ModifyCallbackMetaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyCallbackMetaResponse
 */
async function modifyCallbackMetaWithOptions(tmpReq: ModifyCallbackMetaRequest, runtime: $RuntimeOptions): ModifyCallbackMetaResponse {
  tmpReq.validate();
  var request = new ModifyCallbackMetaShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.callback)) {
    request.callbackShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.callback, 'Callback', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callbackShrink)) {
    query['Callback'] = request.callbackShrink;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyCallbackMeta',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新app回调
 *
 * @param request ModifyCallbackMetaRequest
 * @return ModifyCallbackMetaResponse
 */
async function modifyCallbackMeta(request: ModifyCallbackMetaRequest): ModifyCallbackMetaResponse {
  var runtime = new $RuntimeOptions{};
  return modifyCallbackMetaWithOptions(request, runtime);
}

model ModifyMPULayoutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  audioMixCount?: int32(name='AudioMixCount', example='3'),
  layoutId?: long(name='LayoutId', description='This parameter is required.', example='10117'),
  name?: string(name='Name', example='LayoutName'),
  ownerId?: long(name='OwnerId'),
  panes?: [ 
    {
      height?: float(name='Height', example='0.2456'),
      majorPane?: int32(name='MajorPane', example='0'),
      paneId?: int32(name='PaneId', example='0'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Panes'),
}

model ModifyMPULayoutResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model ModifyMPULayoutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyMPULayoutResponseBody(name='body'),
}

/**
 * @param request ModifyMPULayoutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyMPULayoutResponse
 */
async function modifyMPULayoutWithOptions(request: ModifyMPULayoutRequest, runtime: $RuntimeOptions): ModifyMPULayoutResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.audioMixCount)) {
    query['AudioMixCount'] = request.audioMixCount;
  }
  if (!$isNull(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyMPULayout',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyMPULayoutRequest
 * @return ModifyMPULayoutResponse
 */
async function modifyMPULayout(request: ModifyMPULayoutRequest): ModifyMPULayoutResponse {
  var runtime = new $RuntimeOptions{};
  return modifyMPULayoutWithOptions(request, runtime);
}

model RemoveTerminalsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='yourChannelId'),
  ownerId?: long(name='OwnerId'),
  terminalIds?: [ string ](name='TerminalIds', description='This parameter is required.', example='1811xxxx'),
}

model RemoveTerminalsResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CD8'),
  terminals?: {
    terminal?: [ 
    {
      code?: int32(name='Code', example='0'),
      id?: string(name='Id', example='1811****'),
      message?: string(name='Message', example='Success'),
    }
  ](name='Terminal')
  }(name='Terminals'),
}

model RemoveTerminalsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveTerminalsResponseBody(name='body'),
}

/**
 * @param request RemoveTerminalsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveTerminalsResponse
 */
async function removeTerminalsWithOptions(request: RemoveTerminalsRequest, runtime: $RuntimeOptions): RemoveTerminalsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.terminalIds)) {
    query['TerminalIds'] = request.terminalIds;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RemoveTerminals',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RemoveTerminalsRequest
 * @return RemoveTerminalsResponse
 */
async function removeTerminals(request: RemoveTerminalsRequest): RemoveTerminalsResponse {
  var runtime = new $RuntimeOptions{};
  return removeTerminalsWithOptions(request, runtime);
}

model RemoveUsersRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  users?: [ 
    {
      userId?: string(name='UserId', description='This parameter is required.', example='1811****'),
    }
  ](name='Users', description='This parameter is required.'),
}

model RemoveUsersResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  users?: [ 
    {
      code?: int32(name='Code', example='0'),
      message?: string(name='Message', example='Success'),
      userId?: string(name='UserId', example='1811****'),
    }
  ](name='Users'),
}

model RemoveUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveUsersResponseBody(name='body'),
}

/**
 * @summary RemoveUsers
 *
 * @param request RemoveUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveUsersResponse
 */
async function removeUsersWithOptions(request: RemoveUsersRequest, runtime: $RuntimeOptions): RemoveUsersResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.users)) {
    query['Users'] = request.users;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RemoveUsers',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary RemoveUsers
 *
 * @param request RemoveUsersRequest
 * @return RemoveUsersResponse
 */
async function removeUsers(request: RemoveUsersRequest): RemoveUsersResponse {
  var runtime = new $RuntimeOptions{};
  return removeUsersWithOptions(request, runtime);
}

model StartCategoryCallbackRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callback?: {
    category?: string(name='Category', description='This parameter is required.', example='RecordEvent'),
  }(name='Callback', description='This parameter is required.'),
}

model StartCategoryCallbackShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callbackShrink?: string(name='Callback', description='This parameter is required.'),
}

model StartCategoryCallbackResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
}

model StartCategoryCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartCategoryCallbackResponseBody(name='body'),
}

/**
 * @summary 开启某个事件回调
 *
 * @param tmpReq StartCategoryCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartCategoryCallbackResponse
 */
async function startCategoryCallbackWithOptions(tmpReq: StartCategoryCallbackRequest, runtime: $RuntimeOptions): StartCategoryCallbackResponse {
  tmpReq.validate();
  var request = new StartCategoryCallbackShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.callback)) {
    request.callbackShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.callback, 'Callback', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callbackShrink)) {
    query['Callback'] = request.callbackShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartCategoryCallback',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开启某个事件回调
 *
 * @param request StartCategoryCallbackRequest
 * @return StartCategoryCallbackResponse
 */
async function startCategoryCallback(request: StartCategoryCallbackRequest): StartCategoryCallbackResponse {
  var runtime = new $RuntimeOptions{};
  return startCategoryCallbackWithOptions(request, runtime);
}

model StartCloudNoteRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='2ws***z3'),
  autoChapters?: {
    enabled?: boolean(name='Enabled'),
  }(name='AutoChapters'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='test'),
  customPrompt?: {
    customPromptContents?: [ 
      {
        model?: string(name='Model', example='tingwu-turbo'),
        name?: string(name='Name', description='This parameter is required.', example='split-summary-demo'),
        prompt?: string(name='Prompt', description='This parameter is required.', example='请帮我将下面的对话进行总结，根据发言人来总结:\\n {Transcription}'),
        transType?: string(name='TransType', example='chat'),
      }
    ](name='CustomPromptContents', description='This parameter is required.'),
    enabled?: boolean(name='Enabled'),
  }(name='CustomPrompt'),
  languageHints?: [ string ](name='LanguageHints'),
  meetingAssistance?: {
    enabled?: boolean(name='Enabled'),
    meetingAssistanceType?: [ string ](name='MeetingAssistanceType', description='This parameter is required.'),
  }(name='MeetingAssistance'),
  realtimeSubtitle?: {
    enabled?: boolean(name='Enabled'),
    translation?: {
      translateLevel?: int32(name='TranslateLevel', example='1'),
    }(name='Translation'),
  }(name='RealtimeSubtitle'),
  serviceInspection?: {
    enabled?: boolean(name='Enabled'),
    inspectionContents?: [ 
      {
        content?: string(name='Content', description='This parameter is required.', example='销售在开场白的时候主动向客户打招呼进行欢迎'),
        title?: string(name='Title', description='This parameter is required.', example='到店欢迎-欢迎语'),
      }
    ](name='InspectionContents', description='This parameter is required.'),
    inspectionIntroduction?: string(name='InspectionIntroduction', description='This parameter is required.', example='请监测对话中销售人员表现是否接待热情、态度良好'),
    sceneIntroduction?: string(name='SceneIntroduction', description='This parameter is required.', example='汽车门店线下销售场景'),
  }(name='ServiceInspection'),
  sourceLanguage?: string(name='SourceLanguage', example='cn'),
  storageConfig?: {
    accessKey?: string(name='AccessKey', description='accessKey。

This parameter is required.', example='LTAX***'),
    bucket?: string(name='Bucket', description='This parameter is required.', example='test-bucket-for-recording'),
    region?: int32(name='Region', description='This parameter is required.', example='0'),
    secretKey?: string(name='SecretKey', description='secretKey。

This parameter is required.', example='APb6qWYEzKtYxE***'),
    vendor?: int32(name='Vendor', description='This parameter is required.', example='1'),
  }(name='StorageConfig', description='This parameter is required.'),
  summarization?: {
    enabled?: boolean(name='Enabled'),
    type?: [ string ](name='Type', description='This parameter is required.'),
  }(name='Summarization'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='rtc'),
  textPolish?: {
    enabled?: boolean(name='Enabled'),
  }(name='TextPolish'),
  transcription?: {
    diarizationEnabled?: boolean(name='DiarizationEnabled'),
    speakerCount?: int32(name='SpeakerCount'),
    transcriptionLevel?: int32(name='TranscriptionLevel', example='1'),
  }(name='Transcription'),
}

model StartCloudNoteShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='2ws***z3'),
  autoChaptersShrink?: string(name='AutoChapters'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='test'),
  customPromptShrink?: string(name='CustomPrompt'),
  languageHints?: [ string ](name='LanguageHints'),
  meetingAssistanceShrink?: string(name='MeetingAssistance'),
  realtimeSubtitleShrink?: string(name='RealtimeSubtitle'),
  serviceInspectionShrink?: string(name='ServiceInspection'),
  sourceLanguage?: string(name='SourceLanguage', example='cn'),
  storageConfig?: {
    accessKey?: string(name='AccessKey', description='accessKey。

This parameter is required.', example='LTAX***'),
    bucket?: string(name='Bucket', description='This parameter is required.', example='test-bucket-for-recording'),
    region?: int32(name='Region', description='This parameter is required.', example='0'),
    secretKey?: string(name='SecretKey', description='secretKey。

This parameter is required.', example='APb6qWYEzKtYxE***'),
    vendor?: int32(name='Vendor', description='This parameter is required.', example='1'),
  }(name='StorageConfig', description='This parameter is required.'),
  summarizationShrink?: string(name='Summarization'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='rtc'),
  textPolishShrink?: string(name='TextPolish'),
  transcriptionShrink?: string(name='Transcription'),
}

model StartCloudNoteResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model StartCloudNoteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartCloudNoteResponseBody(name='body'),
}

/**
 * @summary 开启智能纪要
 *
 * @param tmpReq StartCloudNoteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartCloudNoteResponse
 */
async function startCloudNoteWithOptions(tmpReq: StartCloudNoteRequest, runtime: $RuntimeOptions): StartCloudNoteResponse {
  tmpReq.validate();
  var request = new StartCloudNoteShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.autoChapters)) {
    request.autoChaptersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.autoChapters, 'AutoChapters', 'json');
  }
  if (!$isNull(tmpReq.customPrompt)) {
    request.customPromptShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.customPrompt, 'CustomPrompt', 'json');
  }
  if (!$isNull(tmpReq.meetingAssistance)) {
    request.meetingAssistanceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.meetingAssistance, 'MeetingAssistance', 'json');
  }
  if (!$isNull(tmpReq.realtimeSubtitle)) {
    request.realtimeSubtitleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.realtimeSubtitle, 'RealtimeSubtitle', 'json');
  }
  if (!$isNull(tmpReq.serviceInspection)) {
    request.serviceInspectionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.serviceInspection, 'ServiceInspection', 'json');
  }
  if (!$isNull(tmpReq.summarization)) {
    request.summarizationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.summarization, 'Summarization', 'json');
  }
  if (!$isNull(tmpReq.textPolish)) {
    request.textPolishShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.textPolish, 'TextPolish', 'json');
  }
  if (!$isNull(tmpReq.transcription)) {
    request.transcriptionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.transcription, 'Transcription', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.autoChaptersShrink)) {
    query['AutoChapters'] = request.autoChaptersShrink;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.customPromptShrink)) {
    query['CustomPrompt'] = request.customPromptShrink;
  }
  if (!$isNull(request.languageHints)) {
    query['LanguageHints'] = request.languageHints;
  }
  if (!$isNull(request.meetingAssistanceShrink)) {
    query['MeetingAssistance'] = request.meetingAssistanceShrink;
  }
  if (!$isNull(request.realtimeSubtitleShrink)) {
    query['RealtimeSubtitle'] = request.realtimeSubtitleShrink;
  }
  if (!$isNull(request.serviceInspectionShrink)) {
    query['ServiceInspection'] = request.serviceInspectionShrink;
  }
  if (!$isNull(request.sourceLanguage)) {
    query['SourceLanguage'] = request.sourceLanguage;
  }
  if (!$isNull(request.storageConfig)) {
    query['StorageConfig'] = request.storageConfig;
  }
  if (!$isNull(request.summarizationShrink)) {
    query['Summarization'] = request.summarizationShrink;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.textPolishShrink)) {
    query['TextPolish'] = request.textPolishShrink;
  }
  if (!$isNull(request.transcriptionShrink)) {
    query['Transcription'] = request.transcriptionShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartCloudNote',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 开启智能纪要
 *
 * @param request StartCloudNoteRequest
 * @return StartCloudNoteResponse
 */
async function startCloudNote(request: StartCloudNoteRequest): StartCloudNoteResponse {
  var runtime = new $RuntimeOptions{};
  return startCloudNoteWithOptions(request, runtime);
}

model StartCloudRecordRequest {
  appId?: string(name='AppId', description='appId

This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='channelName

This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='2'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.3'),
    }
  ](name='Images'),
  layoutSpecifiedUsers?: {
    ids?: [ string ](name='Ids', description='This parameter is required.'),
    type?: string(name='Type', description='This parameter is required.'),
  }(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='3'),
      paneId?: int32(name='PaneId', description='paneId

This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', description='source'),
      sourceType?: string(name='SourceType', description='sourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes', description='panes'),
  regionColor?: {
    b?: int32(name='B', example='255'),
    g?: int32(name='G', example='255'),
    r?: int32(name='R', example='255'),
  }(name='RegionColor'),
  reservePaneForNoCameraUser?: boolean(name='ReservePaneForNoCameraUser'),
  showDefaultBackgroundOnMute?: boolean(name='ShowDefaultBackgroundOnMute'),
  storageConfig?: {
    accessKey?: string(name='AccessKey', description='accessKey

This parameter is required.', example='LTAX***'),
    bucket?: string(name='Bucket', description='bucket

This parameter is required.', example='test-bucket-for-recording'),
    endpoint?: string(name='Endpoint', example='https://aliyuns.dalian.oss.com'),
    region?: int32(name='Region', description='region

This parameter is required.', example='0'),
    secretKey?: string(name='SecretKey', description='secretKey

This parameter is required.', example='APb6qWYEzKtYxE***'),
    vendor?: int32(name='Vendor', description='vendor

This parameter is required.', example='1'),
  }(name='StorageConfig', description='storageConfig

This parameter is required.'),
  taskId?: string(name='TaskId', description='taskId', example='123'),
  templateId?: string(name='TemplateId', description='templateId

This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model StartCloudRecordShrinkRequest {
  appId?: string(name='AppId', description='appId

This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='channelName

This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='2'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.3'),
    }
  ](name='Images'),
  layoutSpecifiedUsersShrink?: string(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='3'),
      paneId?: int32(name='PaneId', description='paneId

This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', description='source'),
      sourceType?: string(name='SourceType', description='sourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes', description='panes'),
  regionColor?: {
    b?: int32(name='B', example='255'),
    g?: int32(name='G', example='255'),
    r?: int32(name='R', example='255'),
  }(name='RegionColor'),
  reservePaneForNoCameraUser?: boolean(name='ReservePaneForNoCameraUser'),
  showDefaultBackgroundOnMute?: boolean(name='ShowDefaultBackgroundOnMute'),
  storageConfig?: {
    accessKey?: string(name='AccessKey', description='accessKey

This parameter is required.', example='LTAX***'),
    bucket?: string(name='Bucket', description='bucket

This parameter is required.', example='test-bucket-for-recording'),
    endpoint?: string(name='Endpoint', example='https://aliyuns.dalian.oss.com'),
    region?: int32(name='Region', description='region

This parameter is required.', example='0'),
    secretKey?: string(name='SecretKey', description='secretKey

This parameter is required.', example='APb6qWYEzKtYxE***'),
    vendor?: int32(name='Vendor', description='vendor

This parameter is required.', example='1'),
  }(name='StorageConfig', description='storageConfig

This parameter is required.'),
  taskId?: string(name='TaskId', description='taskId', example='123'),
  templateId?: string(name='TemplateId', description='templateId

This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model StartCloudRecordResponseBody = {
  requestId?: string(name='RequestId', description='requestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', description='taskId', example='123'),
}

model StartCloudRecordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartCloudRecordResponseBody(name='body'),
}

/**
 * @summary StartCloudRecord
 *
 * @param tmpReq StartCloudRecordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartCloudRecordResponse
 */
async function startCloudRecordWithOptions(tmpReq: StartCloudRecordRequest, runtime: $RuntimeOptions): StartCloudRecordResponse {
  tmpReq.validate();
  var request = new StartCloudRecordShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layoutSpecifiedUsers)) {
    request.layoutSpecifiedUsersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layoutSpecifiedUsers, 'LayoutSpecifiedUsers', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.images)) {
    query['Images'] = request.images;
  }
  if (!$isNull(request.layoutSpecifiedUsersShrink)) {
    query['LayoutSpecifiedUsers'] = request.layoutSpecifiedUsersShrink;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  if (!$isNull(request.regionColor)) {
    query['RegionColor'] = request.regionColor;
  }
  if (!$isNull(request.reservePaneForNoCameraUser)) {
    query['ReservePaneForNoCameraUser'] = request.reservePaneForNoCameraUser;
  }
  if (!$isNull(request.showDefaultBackgroundOnMute)) {
    query['ShowDefaultBackgroundOnMute'] = request.showDefaultBackgroundOnMute;
  }
  if (!$isNull(request.storageConfig)) {
    query['StorageConfig'] = request.storageConfig;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.texts)) {
    query['Texts'] = request.texts;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartCloudRecord',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary StartCloudRecord
 *
 * @param request StartCloudRecordRequest
 * @return StartCloudRecordResponse
 */
async function startCloudRecord(request: StartCloudRecordRequest): StartCloudRecordResponse {
  var runtime = new $RuntimeOptions{};
  return startCloudRecordWithOptions(request, runtime);
}

model StartMPUTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  backgroundColor?: int32(name='BackgroundColor', example='0'),
  backgrounds?: [ 
    {
      display?: int32(name='Display', example='1'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='yourChannelId'),
  clockWidgets?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      borderColor?: long(name='BorderColor', example='0'),
      borderWidth?: int32(name='BorderWidth', example='1'),
      box?: boolean(name='Box', example='false'),
      boxBorderWidth?: int32(name='BoxBorderWidth', example='0'),
      boxColor?: long(name='BoxColor', example='0'),
      fontColor?: int32(name='FontColor', example='0'),
      fontSize?: int32(name='FontSize', example='1'),
      fontType?: int32(name='FontType', example='0'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='1'),
  enhancedParam?: {
    enablePortraitSegmentation?: boolean(name='EnablePortraitSegmentation', example='false'),
  }(name='EnhancedParam'),
  layoutIds?: [ long ](name='LayoutIds', example='1'),
  mediaEncode?: int32(name='MediaEncode', example='2'),
  mixMode?: int32(name='MixMode', example='0'),
  ownerId?: long(name='OwnerId'),
  payloadType?: int32(name='PayloadType', example='0'),
  reportVad?: int32(name='ReportVad', example='0'),
  rtpExtInfo?: int32(name='RtpExtInfo', example='0'),
  sourceType?: string(name='SourceType', example='camera'),
  streamType?: int32(name='StreamType', example='0'),
  streamURL?: string(name='StreamURL', example='rtmp://example.com/live/stream'),
  subSpecAudioUsers?: [ string ](name='SubSpecAudioUsers', example='audioUserID'),
  subSpecCameraUsers?: [ string ](name='SubSpecCameraUsers'),
  subSpecShareScreenUsers?: [ string ](name='SubSpecShareScreenUsers'),
  subSpecUsers?: [ string ](name='SubSpecUsers', example='userID'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
  taskType?: int32(name='TaskType', example='0'),
  timeStampRef?: long(name='TimeStampRef', example='15273582735'),
  unsubSpecAudioUsers?: [ string ](name='UnsubSpecAudioUsers'),
  unsubSpecCameraUsers?: [ string ](name='UnsubSpecCameraUsers'),
  unsubSpecShareScreenUsers?: [ string ](name='UnsubSpecShareScreenUsers'),
  userPanes?: [ 
    {
      images?: [ 
        {
          display?: int32(name='Display', example='1'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Images'),
      paneId?: int32(name='PaneId', example='2'),
      segmentType?: int32(name='SegmentType', example='0'),
      sourceType?: string(name='SourceType', example='camera'),
      texts?: [ 
        {
          alpha?: float(name='Alpha', example='0'),
          borderColor?: long(name='BorderColor', example='0'),
          borderWidth?: int32(name='BorderWidth', example='1'),
          box?: boolean(name='Box', example='false'),
          boxBorderWidth?: int32(name='BoxBorderWidth', example='0'),
          boxColor?: long(name='BoxColor', example='0'),
          fontColor?: int32(name='FontColor', example='0'),
          fontSize?: int32(name='FontSize', example='1'),
          fontType?: int32(name='FontType', example='0'),
          text?: string(name='Text', example='text'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.2456'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Texts'),
      userId?: string(name='UserId', example='TestId'),
    }
  ](name='UserPanes'),
  vadInterval?: long(name='VadInterval', example='86400'),
  watermarks?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      display?: int32(name='Display', example='0'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Watermarks'),
}

model StartMPUTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model StartMPUTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartMPUTaskResponseBody(name='body'),
}

/**
 * @param request StartMPUTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartMPUTaskResponse
 */
async function startMPUTaskWithOptions(request: StartMPUTaskRequest, runtime: $RuntimeOptions): StartMPUTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgroundColor)) {
    query['BackgroundColor'] = request.backgroundColor;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.mixMode)) {
    query['MixMode'] = request.mixMode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.payloadType)) {
    query['PayloadType'] = request.payloadType;
  }
  if (!$isNull(request.reportVad)) {
    query['ReportVad'] = request.reportVad;
  }
  if (!$isNull(request.rtpExtInfo)) {
    query['RtpExtInfo'] = request.rtpExtInfo;
  }
  if (!$isNull(request.sourceType)) {
    query['SourceType'] = request.sourceType;
  }
  if (!$isNull(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  if (!$isNull(request.streamURL)) {
    query['StreamURL'] = request.streamURL;
  }
  if (!$isNull(request.subSpecAudioUsers)) {
    query['SubSpecAudioUsers'] = request.subSpecAudioUsers;
  }
  if (!$isNull(request.subSpecCameraUsers)) {
    query['SubSpecCameraUsers'] = request.subSpecCameraUsers;
  }
  if (!$isNull(request.subSpecShareScreenUsers)) {
    query['SubSpecShareScreenUsers'] = request.subSpecShareScreenUsers;
  }
  if (!$isNull(request.subSpecUsers)) {
    query['SubSpecUsers'] = request.subSpecUsers;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  if (!$isNull(request.timeStampRef)) {
    query['TimeStampRef'] = request.timeStampRef;
  }
  if (!$isNull(request.unsubSpecAudioUsers)) {
    query['UnsubSpecAudioUsers'] = request.unsubSpecAudioUsers;
  }
  if (!$isNull(request.unsubSpecCameraUsers)) {
    query['UnsubSpecCameraUsers'] = request.unsubSpecCameraUsers;
  }
  if (!$isNull(request.unsubSpecShareScreenUsers)) {
    query['UnsubSpecShareScreenUsers'] = request.unsubSpecShareScreenUsers;
  }
  if (!$isNull(request.userPanes)) {
    query['UserPanes'] = request.userPanes;
  }
  if (!$isNull(request.vadInterval)) {
    query['VadInterval'] = request.vadInterval;
  }
  if (!$isNull(request.watermarks)) {
    query['Watermarks'] = request.watermarks;
  }
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!$isNull(request.enhancedParam)) {
    bodyFlat['EnhancedParam'] = request.enhancedParam;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartMPUTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request StartMPUTaskRequest
 * @return StartMPUTaskResponse
 */
async function startMPUTask(request: StartMPUTaskRequest): StartMPUTaskResponse {
  var runtime = new $RuntimeOptions{};
  return startMPUTaskWithOptions(request, runtime);
}

model StartRecordTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='yourChannelId'),
  cropMode?: long(name='CropMode', example='1'),
  layoutIds?: [ long ](name='LayoutIds', example='1111'),
  mediaEncode?: int32(name='MediaEncode', example='20'),
  mixMode?: int32(name='MixMode', example='1'),
  ownerId?: long(name='OwnerId'),
  sourceType?: string(name='SourceType', example='camera'),
  streamType?: int32(name='StreamType', example='0'),
  subSpecAudioUsers?: [ string ](name='SubSpecAudioUsers', example='1'),
  subSpecCameraUsers?: [ string ](name='SubSpecCameraUsers', example='1'),
  subSpecShareScreenUsers?: [ string ](name='SubSpecShareScreenUsers', example='1'),
  subSpecUsers?: [ string ](name='SubSpecUsers', example='userID'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
  taskProfile?: string(name='TaskProfile', example='4IN_1080P'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='76dasgb****'),
  unsubSpecAudioUsers?: [ string ](name='UnsubSpecAudioUsers', example='1'),
  unsubSpecCameraUsers?: [ string ](name='UnsubSpecCameraUsers', example='1'),
  unsubSpecShareScreenUsers?: [ string ](name='UnsubSpecShareScreenUsers', example='1'),
  userPanes?: [ 
    {
      images?: [ 
        {
          display?: int32(name='Display', example='1'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Images'),
      paneId?: int32(name='PaneId', example='2'),
      sourceType?: string(name='SourceType', example='camera'),
      texts?: [ 
        {
          fontColor?: int32(name='FontColor', example='1'),
          fontSize?: int32(name='FontSize', example='1'),
          fontType?: int32(name='FontType', example='0'),
          text?: string(name='Text', example='text'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Texts'),
      userId?: string(name='UserId', example='TestId'),
    }
  ](name='UserPanes'),
}

model StartRecordTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b****'),
}

model StartRecordTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartRecordTaskResponseBody(name='body'),
}

/**
 * @param request StartRecordTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartRecordTaskResponse
 */
async function startRecordTaskWithOptions(request: StartRecordTaskRequest, runtime: $RuntimeOptions): StartRecordTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.mixMode)) {
    query['MixMode'] = request.mixMode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.sourceType)) {
    query['SourceType'] = request.sourceType;
  }
  if (!$isNull(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  if (!$isNull(request.subSpecAudioUsers)) {
    query['SubSpecAudioUsers'] = request.subSpecAudioUsers;
  }
  if (!$isNull(request.subSpecCameraUsers)) {
    query['SubSpecCameraUsers'] = request.subSpecCameraUsers;
  }
  if (!$isNull(request.subSpecShareScreenUsers)) {
    query['SubSpecShareScreenUsers'] = request.subSpecShareScreenUsers;
  }
  if (!$isNull(request.subSpecUsers)) {
    query['SubSpecUsers'] = request.subSpecUsers;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.taskProfile)) {
    query['TaskProfile'] = request.taskProfile;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.unsubSpecAudioUsers)) {
    query['UnsubSpecAudioUsers'] = request.unsubSpecAudioUsers;
  }
  if (!$isNull(request.unsubSpecCameraUsers)) {
    query['UnsubSpecCameraUsers'] = request.unsubSpecCameraUsers;
  }
  if (!$isNull(request.unsubSpecShareScreenUsers)) {
    query['UnsubSpecShareScreenUsers'] = request.unsubSpecShareScreenUsers;
  }
  if (!$isNull(request.userPanes)) {
    query['UserPanes'] = request.userPanes;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartRecordTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request StartRecordTaskRequest
 * @return StartRecordTaskResponse
 */
async function startRecordTask(request: StartRecordTaskRequest): StartRecordTaskResponse {
  var runtime = new $RuntimeOptions{};
  return startRecordTaskWithOptions(request, runtime);
}

model StartStreamingOutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='2'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsers?: {
    ids?: [ string ](name='Ids', description='This parameter is required.'),
    type?: string(name='Type', description='This parameter is required.'),
  }(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.3'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: string(name='PaneId', description='This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='1811****'),
      sourceType?: string(name='SourceType', example='Video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  regionColor?: {
    b?: int32(name='B', example='255'),
    g?: int32(name='G', example='255'),
    r?: int32(name='R', example='255'),
  }(name='RegionColor'),
  reservePaneForNoCameraUser?: boolean(name='ReservePaneForNoCameraUser'),
  showDefaultBackgroundOnMute?: boolean(name='ShowDefaultBackgroundOnMute'),
  startWithoutChannel?: boolean(name='StartWithoutChannel'),
  startWithoutChannelWaitTime?: int32(name='StartWithoutChannelWaitTime', example='30'),
  taskId?: string(name='TaskId', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
  url?: string(name='Url', description='This parameter is required.', example='rtmp://example.com/live/stream'),
}

model StartStreamingOutShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='2'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsersShrink?: string(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.3'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: string(name='PaneId', description='This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='1811****'),
      sourceType?: string(name='SourceType', example='Video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  regionColor?: {
    b?: int32(name='B', example='255'),
    g?: int32(name='G', example='255'),
    r?: int32(name='R', example='255'),
  }(name='RegionColor'),
  reservePaneForNoCameraUser?: boolean(name='ReservePaneForNoCameraUser'),
  showDefaultBackgroundOnMute?: boolean(name='ShowDefaultBackgroundOnMute'),
  startWithoutChannel?: boolean(name='StartWithoutChannel'),
  startWithoutChannelWaitTime?: int32(name='StartWithoutChannelWaitTime', example='30'),
  taskId?: string(name='TaskId', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
  url?: string(name='Url', description='This parameter is required.', example='rtmp://example.com/live/stream'),
}

model StartStreamingOutResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model StartStreamingOutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartStreamingOutResponseBody(name='body'),
}

/**
 * @summary StartStreamingOut
 *
 * @param tmpReq StartStreamingOutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartStreamingOutResponse
 */
async function startStreamingOutWithOptions(tmpReq: StartStreamingOutRequest, runtime: $RuntimeOptions): StartStreamingOutResponse {
  tmpReq.validate();
  var request = new StartStreamingOutShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layoutSpecifiedUsers)) {
    request.layoutSpecifiedUsersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layoutSpecifiedUsers, 'LayoutSpecifiedUsers', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.images)) {
    query['Images'] = request.images;
  }
  if (!$isNull(request.layoutSpecifiedUsersShrink)) {
    query['LayoutSpecifiedUsers'] = request.layoutSpecifiedUsersShrink;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  if (!$isNull(request.regionColor)) {
    query['RegionColor'] = request.regionColor;
  }
  if (!$isNull(request.reservePaneForNoCameraUser)) {
    query['ReservePaneForNoCameraUser'] = request.reservePaneForNoCameraUser;
  }
  if (!$isNull(request.showDefaultBackgroundOnMute)) {
    query['ShowDefaultBackgroundOnMute'] = request.showDefaultBackgroundOnMute;
  }
  if (!$isNull(request.startWithoutChannel)) {
    query['StartWithoutChannel'] = request.startWithoutChannel;
  }
  if (!$isNull(request.startWithoutChannelWaitTime)) {
    query['StartWithoutChannelWaitTime'] = request.startWithoutChannelWaitTime;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.texts)) {
    query['Texts'] = request.texts;
  }
  if (!$isNull(request.url)) {
    query['Url'] = request.url;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartStreamingOut',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary StartStreamingOut
 *
 * @param request StartStreamingOutRequest
 * @return StartStreamingOutResponse
 */
async function startStreamingOut(request: StartStreamingOutRequest): StartStreamingOutResponse {
  var runtime = new $RuntimeOptions{};
  return startStreamingOutWithOptions(request, runtime);
}

model StopCategoryCallbackRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callback?: {
    category?: string(name='Category', description='This parameter is required.', example='RecordEvent'),
  }(name='Callback', description='This parameter is required.'),
}

model StopCategoryCallbackShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='223***JQb'),
  callbackShrink?: string(name='Callback', description='This parameter is required.'),
}

model StopCategoryCallbackResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='2DCE8D7E-BE3B-54AB-8DAC-32F34BED0763'),
}

model StopCategoryCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopCategoryCallbackResponseBody(name='body'),
}

/**
 * @summary 关闭某个事件回调
 *
 * @param tmpReq StopCategoryCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopCategoryCallbackResponse
 */
async function stopCategoryCallbackWithOptions(tmpReq: StopCategoryCallbackRequest, runtime: $RuntimeOptions): StopCategoryCallbackResponse {
  tmpReq.validate();
  var request = new StopCategoryCallbackShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.callback)) {
    request.callbackShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.callback, 'Callback', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callbackShrink)) {
    query['Callback'] = request.callbackShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopCategoryCallback',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 关闭某个事件回调
 *
 * @param request StopCategoryCallbackRequest
 * @return StopCategoryCallbackResponse
 */
async function stopCategoryCallback(request: StopCategoryCallbackRequest): StopCategoryCallbackResponse {
  var runtime = new $RuntimeOptions{};
  return stopCategoryCallbackWithOptions(request, runtime);
}

model StopChannelRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
}

model StopChannelResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
}

model StopChannelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopChannelResponseBody(name='body'),
}

/**
 * @summary 删除频道
 *
 * @param request StopChannelRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopChannelResponse
 */
async function stopChannelWithOptions(request: StopChannelRequest, runtime: $RuntimeOptions): StopChannelResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopChannel',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除频道
 *
 * @param request StopChannelRequest
 * @return StopChannelResponse
 */
async function stopChannel(request: StopChannelRequest): StopChannelResponse {
  var runtime = new $RuntimeOptions{};
  return stopChannelWithOptions(request, runtime);
}

model StopCloudNoteRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='qwsz1234'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='test'),
  clientToken?: string(name='ClientToken'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='rtc'),
}

model StopCloudNoteResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model StopCloudNoteResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopCloudNoteResponseBody(name='body'),
}

/**
 * @summary 停止智能纪要
 *
 * @param request StopCloudNoteRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopCloudNoteResponse
 */
async function stopCloudNoteWithOptions(request: StopCloudNoteRequest, runtime: $RuntimeOptions): StopCloudNoteResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopCloudNote',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 停止智能纪要
 *
 * @param request StopCloudNoteRequest
 * @return StopCloudNoteResponse
 */
async function stopCloudNote(request: StopCloudNoteRequest): StopCloudNoteResponse {
  var runtime = new $RuntimeOptions{};
  return stopCloudNoteWithOptions(request, runtime);
}

model StopCloudRecordRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
}

model StopCloudRecordResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model StopCloudRecordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopCloudRecordResponseBody(name='body'),
}

/**
 * @summary StopCloudRecord
 *
 * @param request StopCloudRecordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopCloudRecordResponse
 */
async function stopCloudRecordWithOptions(request: StopCloudRecordRequest, runtime: $RuntimeOptions): StopCloudRecordResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopCloudRecord',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary StopCloudRecord
 *
 * @param request StopCloudRecordRequest
 * @return StopCloudRecordResponse
 */
async function stopCloudRecord(request: StopCloudRecordRequest): StopCloudRecordResponse {
  var runtime = new $RuntimeOptions{};
  return stopCloudRecordWithOptions(request, runtime);
}

model StopMPUTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  ownerId?: long(name='OwnerId'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
}

model StopMPUTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model StopMPUTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopMPUTaskResponseBody(name='body'),
}

/**
 * @param request StopMPUTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopMPUTaskResponse
 */
async function stopMPUTaskWithOptions(request: StopMPUTaskRequest, runtime: $RuntimeOptions): StopMPUTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopMPUTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request StopMPUTaskRequest
 * @return StopMPUTaskResponse
 */
async function stopMPUTask(request: StopMPUTaskRequest): StopMPUTaskResponse {
  var runtime = new $RuntimeOptions{};
  return stopMPUTaskWithOptions(request, runtime);
}

model StopRecordTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  ownerId?: long(name='OwnerId'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
}

model StopRecordTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model StopRecordTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopRecordTaskResponseBody(name='body'),
}

/**
 * @param request StopRecordTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopRecordTaskResponse
 */
async function stopRecordTaskWithOptions(request: StopRecordTaskRequest, runtime: $RuntimeOptions): StopRecordTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopRecordTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request StopRecordTaskRequest
 * @return StopRecordTaskResponse
 */
async function stopRecordTask(request: StopRecordTaskRequest): StopRecordTaskResponse {
  var runtime = new $RuntimeOptions{};
  return stopRecordTaskWithOptions(request, runtime);
}

model StopStreamingOutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
}

model StopStreamingOutResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model StopStreamingOutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopStreamingOutResponseBody(name='body'),
}

/**
 * @summary StopStreamingOut
 *
 * @param request StopStreamingOutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopStreamingOutResponse
 */
async function stopStreamingOutWithOptions(request: StopStreamingOutRequest, runtime: $RuntimeOptions): StopStreamingOutResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopStreamingOut',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary StopStreamingOut
 *
 * @param request StopStreamingOutRequest
 * @return StopStreamingOutResponse
 */
async function stopStreamingOut(request: StopStreamingOutRequest): StopStreamingOutResponse {
  var runtime = new $RuntimeOptions{};
  return stopStreamingOutWithOptions(request, runtime);
}

model UpdateAutoLiveStreamRuleRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  callBack?: string(name='CallBack', example='http://example.com/callback'),
  channelIdPrefixes?: [ string ](name='ChannelIdPrefixes'),
  channelIds?: [ string ](name='ChannelIds'),
  mediaEncode?: int32(name='MediaEncode', example='20'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', description='This parameter is required.', example='rtmp://${domain}/${app}/${stream}'),
  ruleId?: int32(name='RuleId', description='This parameter is required.', example='12'),
  ruleName?: string(name='RuleName', example='testRule'),
}

model UpdateAutoLiveStreamRuleResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model UpdateAutoLiveStreamRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAutoLiveStreamRuleResponseBody(name='body'),
}

/**
 * @param request UpdateAutoLiveStreamRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAutoLiveStreamRuleResponse
 */
async function updateAutoLiveStreamRuleWithOptions(request: UpdateAutoLiveStreamRuleRequest, runtime: $RuntimeOptions): UpdateAutoLiveStreamRuleResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.callBack)) {
    query['CallBack'] = request.callBack;
  }
  if (!$isNull(request.channelIdPrefixes)) {
    query['ChannelIdPrefixes'] = request.channelIdPrefixes;
  }
  if (!$isNull(request.channelIds)) {
    query['ChannelIds'] = request.channelIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!$isNull(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!$isNull(request.ruleName)) {
    query['RuleName'] = request.ruleName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateAutoLiveStreamRule',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAutoLiveStreamRuleRequest
 * @return UpdateAutoLiveStreamRuleResponse
 */
async function updateAutoLiveStreamRule(request: UpdateAutoLiveStreamRuleRequest): UpdateAutoLiveStreamRuleResponse {
  var runtime = new $RuntimeOptions{};
  return updateAutoLiveStreamRuleWithOptions(request, runtime);
}

model UpdateCloudRecordRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsers?: {
    ids?: [ string ](name='Ids', description='This parameter is required.'),
    type?: string(name='Type', description='This parameter is required.'),
  }(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: int32(name='PaneId', description='This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='22'),
      sourceType?: string(name='SourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model UpdateCloudRecordShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsersShrink?: string(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xxx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: int32(name='PaneId', description='This parameter is required.', example='0'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='22'),
      sourceType?: string(name='SourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model UpdateCloudRecordResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model UpdateCloudRecordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateCloudRecordResponseBody(name='body'),
}

/**
 * @summary 更新云端录制任务
 *
 * @param tmpReq UpdateCloudRecordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateCloudRecordResponse
 */
async function updateCloudRecordWithOptions(tmpReq: UpdateCloudRecordRequest, runtime: $RuntimeOptions): UpdateCloudRecordResponse {
  tmpReq.validate();
  var request = new UpdateCloudRecordShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layoutSpecifiedUsers)) {
    request.layoutSpecifiedUsersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layoutSpecifiedUsers, 'LayoutSpecifiedUsers', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.images)) {
    query['Images'] = request.images;
  }
  if (!$isNull(request.layoutSpecifiedUsersShrink)) {
    query['LayoutSpecifiedUsers'] = request.layoutSpecifiedUsersShrink;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.texts)) {
    query['Texts'] = request.texts;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateCloudRecord',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新云端录制任务
 *
 * @param request UpdateCloudRecordRequest
 * @return UpdateCloudRecordResponse
 */
async function updateCloudRecord(request: UpdateCloudRecordRequest): UpdateCloudRecordResponse {
  var runtime = new $RuntimeOptions{};
  return updateCloudRecordWithOptions(request, runtime);
}

model UpdateMPUTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  backgroundColor?: int32(name='BackgroundColor', example='0'),
  backgrounds?: [ 
    {
      display?: int32(name='Display', example='1'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Backgrounds'),
  clockWidgets?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      borderColor?: long(name='BorderColor', example='0'),
      borderWidth?: int32(name='BorderWidth', example='1'),
      box?: boolean(name='Box', example='false'),
      boxBorderWidth?: int32(name='BoxBorderWidth', example='0'),
      boxColor?: long(name='BoxColor', example='0'),
      fontColor?: int32(name='FontColor', example='0'),
      fontSize?: int32(name='FontSize', example='1'),
      fontType?: int32(name='FontType', example='0'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='ClockWidgets'),
  cropMode?: int32(name='CropMode', example='1'),
  layoutIds?: [ long ](name='LayoutIds'),
  mediaEncode?: int32(name='MediaEncode', example='2'),
  mixMode?: int32(name='MixMode', example='0'),
  ownerId?: long(name='OwnerId'),
  sourceType?: string(name='SourceType', example='camera'),
  streamType?: int32(name='StreamType', example='0'),
  subSpecAudioUsers?: [ string ](name='SubSpecAudioUsers'),
  subSpecCameraUsers?: [ string ](name='SubSpecCameraUsers'),
  subSpecShareScreenUsers?: [ string ](name='SubSpecShareScreenUsers'),
  subSpecUsers?: [ string ](name='SubSpecUsers'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='testId'),
  unsubSpecAudioUsers?: [ string ](name='UnsubSpecAudioUsers'),
  unsubSpecCameraUsers?: [ string ](name='UnsubSpecCameraUsers'),
  unsubSpecShareScreenUsers?: [ string ](name='UnsubSpecShareScreenUsers'),
  userPanes?: [ 
    {
      images?: [ 
        {
          display?: int32(name='Display', example='1'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Images'),
      paneId?: int32(name='PaneId', example='2'),
      segmentType?: int32(name='SegmentType', example='0'),
      sourceType?: string(name='SourceType', example='camera'),
      texts?: [ 
        {
          alpha?: float(name='Alpha', example='0'),
          borderColor?: long(name='BorderColor', example='0'),
          borderWidth?: int32(name='BorderWidth', example='1'),
          box?: boolean(name='Box', example='false'),
          boxBorderWidth?: int32(name='BoxBorderWidth', example='0'),
          boxColor?: long(name='BoxColor', example='0'),
          fontColor?: int32(name='FontColor', example='0'),
          fontSize?: int32(name='FontSize', example='1'),
          fontType?: int32(name='FontType', example='0'),
          text?: string(name='Text', example='text'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Texts'),
      userId?: string(name='UserId', example='TestUserID'),
    }
  ](name='UserPanes'),
  watermarks?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      display?: int32(name='Display', example='1'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Watermarks'),
}

model UpdateMPUTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model UpdateMPUTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateMPUTaskResponseBody(name='body'),
}

/**
 * @param request UpdateMPUTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateMPUTaskResponse
 */
async function updateMPUTaskWithOptions(request: UpdateMPUTaskRequest, runtime: $RuntimeOptions): UpdateMPUTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgroundColor)) {
    query['BackgroundColor'] = request.backgroundColor;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.mixMode)) {
    query['MixMode'] = request.mixMode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.sourceType)) {
    query['SourceType'] = request.sourceType;
  }
  if (!$isNull(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  if (!$isNull(request.subSpecAudioUsers)) {
    query['SubSpecAudioUsers'] = request.subSpecAudioUsers;
  }
  if (!$isNull(request.subSpecCameraUsers)) {
    query['SubSpecCameraUsers'] = request.subSpecCameraUsers;
  }
  if (!$isNull(request.subSpecShareScreenUsers)) {
    query['SubSpecShareScreenUsers'] = request.subSpecShareScreenUsers;
  }
  if (!$isNull(request.subSpecUsers)) {
    query['SubSpecUsers'] = request.subSpecUsers;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.unsubSpecAudioUsers)) {
    query['UnsubSpecAudioUsers'] = request.unsubSpecAudioUsers;
  }
  if (!$isNull(request.unsubSpecCameraUsers)) {
    query['UnsubSpecCameraUsers'] = request.unsubSpecCameraUsers;
  }
  if (!$isNull(request.unsubSpecShareScreenUsers)) {
    query['UnsubSpecShareScreenUsers'] = request.unsubSpecShareScreenUsers;
  }
  if (!$isNull(request.userPanes)) {
    query['UserPanes'] = request.userPanes;
  }
  if (!$isNull(request.watermarks)) {
    query['Watermarks'] = request.watermarks;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateMPUTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateMPUTaskRequest
 * @return UpdateMPUTaskResponse
 */
async function updateMPUTask(request: UpdateMPUTaskRequest): UpdateMPUTaskResponse {
  var runtime = new $RuntimeOptions{};
  return updateMPUTaskWithOptions(request, runtime);
}

model UpdateRecordTaskRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='yourChannelId'),
  cropMode?: long(name='CropMode'),
  layoutIds?: [ long ](name='LayoutIds'),
  mediaEncode?: long(name='MediaEncode'),
  ownerId?: long(name='OwnerId'),
  subSpecAudioUsers?: [ string ](name='SubSpecAudioUsers'),
  subSpecCameraUsers?: [ string ](name='SubSpecCameraUsers'),
  subSpecShareScreenUsers?: [ string ](name='SubSpecShareScreenUsers'),
  subSpecUsers?: [ string ](name='SubSpecUsers', example='userID'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='yourTaskId'),
  taskProfile?: string(name='TaskProfile'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='76dasgb****'),
  unsubSpecAudioUsers?: [ string ](name='UnsubSpecAudioUsers'),
  unsubSpecCameraUsers?: [ string ](name='UnsubSpecCameraUsers'),
  unsubSpecShareScreenUsers?: [ string ](name='UnsubSpecShareScreenUsers'),
  userPanes?: [ 
    {
      images?: [ 
        {
          display?: int32(name='Display', example='1'),
          height?: float(name='Height', example='0.2456'),
          url?: string(name='Url', example='https://www.example.com/image.jpg'),
          width?: float(name='Width', example='0.2456'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Images'),
      paneId?: int32(name='PaneId', example='1'),
      sourceType?: string(name='SourceType', example='camera'),
      texts?: [ 
        {
          fontColor?: int32(name='FontColor', example='0'),
          fontSize?: int32(name='FontSize', example='1'),
          fontType?: int32(name='FontType', example='0'),
          text?: string(name='Text', example='text'),
          x?: float(name='X', example='0.7576'),
          y?: float(name='Y', example='0.7576'),
          ZOrder?: int32(name='ZOrder', example='0'),
        }
      ](name='Texts'),
      userId?: string(name='UserId', example='TestId'),
    }
  ](name='UserPanes'),
}

model UpdateRecordTaskResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
}

model UpdateRecordTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRecordTaskResponseBody(name='body'),
}

/**
 * @param request UpdateRecordTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRecordTaskResponse
 */
async function updateRecordTaskWithOptions(request: UpdateRecordTaskRequest, runtime: $RuntimeOptions): UpdateRecordTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.cropMode)) {
    query['CropMode'] = request.cropMode;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.subSpecAudioUsers)) {
    query['SubSpecAudioUsers'] = request.subSpecAudioUsers;
  }
  if (!$isNull(request.subSpecCameraUsers)) {
    query['SubSpecCameraUsers'] = request.subSpecCameraUsers;
  }
  if (!$isNull(request.subSpecShareScreenUsers)) {
    query['SubSpecShareScreenUsers'] = request.subSpecShareScreenUsers;
  }
  if (!$isNull(request.subSpecUsers)) {
    query['SubSpecUsers'] = request.subSpecUsers;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.taskProfile)) {
    query['TaskProfile'] = request.taskProfile;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.unsubSpecAudioUsers)) {
    query['UnsubSpecAudioUsers'] = request.unsubSpecAudioUsers;
  }
  if (!$isNull(request.unsubSpecCameraUsers)) {
    query['UnsubSpecCameraUsers'] = request.unsubSpecCameraUsers;
  }
  if (!$isNull(request.unsubSpecShareScreenUsers)) {
    query['UnsubSpecShareScreenUsers'] = request.unsubSpecShareScreenUsers;
  }
  if (!$isNull(request.userPanes)) {
    query['UserPanes'] = request.userPanes;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRecordTask',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateRecordTaskRequest
 * @return UpdateRecordTaskResponse
 */
async function updateRecordTask(request: UpdateRecordTaskRequest): UpdateRecordTaskResponse {
  var runtime = new $RuntimeOptions{};
  return updateRecordTaskWithOptions(request, runtime);
}

model UpdateRecordTemplateRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='yourAppId'),
  backgroundColor?: int32(name='BackgroundColor', example='0'),
  backgrounds?: [ 
    {
      display?: int32(name='Display', example='0'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Backgrounds'),
  clockWidgets?: [ 
    {
      fontColor?: int32(name='FontColor', example='0'),
      fontSize?: int32(name='FontSize', example='1'),
      fontType?: int32(name='FontType', example='0'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='ClockWidgets'),
  delayStopTime?: int32(name='DelayStopTime', example='180'),
  enableM3u8DateTime?: boolean(name='EnableM3u8DateTime', example='false'),
  fileSplitInterval?: int32(name='FileSplitInterval', description='This parameter is required.', example='1800'),
  formats?: [ string ](name='Formats', description='This parameter is required.', example='mp4'),
  httpCallbackUrl?: string(name='HttpCallbackUrl', example='http://example.com/callback'),
  layoutIds?: [ long ](name='LayoutIds', description='This parameter is required.', example='1111'),
  mediaEncode?: int32(name='MediaEncode', description='This parameter is required.', example='20'),
  mnsQueue?: string(name='MnsQueue', example='record-callback-queue'),
  name?: string(name='Name', description='This parameter is required.'),
  ossBucket?: string(name='OssBucket', description='This parameter is required.', example='rtc-record-pre'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossFilePrefix?: string(name='OssFilePrefix', description='This parameter is required.', example='record/{AppId}/{ChannelId_TaskId}/{EscapedStartTime}_{EscapedEndTime}'),
  ownerId?: long(name='OwnerId'),
  taskProfile?: string(name='TaskProfile', description='This parameter is required.', example='4IN_1080P'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='76dasgb****'),
  watermarks?: [ 
    {
      alpha?: float(name='Alpha', example='0'),
      display?: int32(name='Display', example='0'),
      height?: float(name='Height', example='0.2456'),
      url?: string(name='Url', example='https://www.example.com/image.jpg'),
      width?: float(name='Width', example='0.2456'),
      x?: float(name='X', example='0.7576'),
      y?: float(name='Y', example='0.7576'),
      ZOrder?: int32(name='ZOrder', example='0'),
    }
  ](name='Watermarks'),
}

model UpdateRecordTemplateResponseBody = {
  requestId?: string(name='RequestId', example='760bad53276431c499e30dc36f6b26be'),
  templateId?: string(name='TemplateId', example='76dasgb****'),
}

model UpdateRecordTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRecordTemplateResponseBody(name='body'),
}

/**
 * @param request UpdateRecordTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRecordTemplateResponse
 */
async function updateRecordTemplateWithOptions(request: UpdateRecordTemplateRequest, runtime: $RuntimeOptions): UpdateRecordTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgroundColor)) {
    query['BackgroundColor'] = request.backgroundColor;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.delayStopTime)) {
    query['DelayStopTime'] = request.delayStopTime;
  }
  if (!$isNull(request.enableM3u8DateTime)) {
    query['EnableM3u8DateTime'] = request.enableM3u8DateTime;
  }
  if (!$isNull(request.fileSplitInterval)) {
    query['FileSplitInterval'] = request.fileSplitInterval;
  }
  if (!$isNull(request.formats)) {
    query['Formats'] = request.formats;
  }
  if (!$isNull(request.httpCallbackUrl)) {
    query['HttpCallbackUrl'] = request.httpCallbackUrl;
  }
  if (!$isNull(request.layoutIds)) {
    query['LayoutIds'] = request.layoutIds;
  }
  if (!$isNull(request.mediaEncode)) {
    query['MediaEncode'] = request.mediaEncode;
  }
  if (!$isNull(request.mnsQueue)) {
    query['MnsQueue'] = request.mnsQueue;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!$isNull(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!$isNull(request.ossFilePrefix)) {
    query['OssFilePrefix'] = request.ossFilePrefix;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.taskProfile)) {
    query['TaskProfile'] = request.taskProfile;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.watermarks)) {
    query['Watermarks'] = request.watermarks;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRecordTemplate',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateRecordTemplateRequest
 * @return UpdateRecordTemplateResponse
 */
async function updateRecordTemplate(request: UpdateRecordTemplateRequest): UpdateRecordTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return updateRecordTemplateWithOptions(request, runtime);
}

model UpdateStreamingOutRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsers?: {
    ids?: [ string ](name='Ids', description='This parameter is required.'),
    type?: string(name='Type', description='This parameter is required.'),
  }(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: int32(name='PaneId', example='1'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='22'),
      sourceType?: string(name='SourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model UpdateStreamingOutShrinkRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='eo85****'),
  backgrounds?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      backgroundCropMode?: int32(name='BackgroundCropMode', example='2'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Backgrounds'),
  channelId?: string(name='ChannelId', description='This parameter is required.', example='testid'),
  clockWidgets?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='30'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
      zone?: int32(name='Zone', example='8'),
    }
  ](name='ClockWidgets'),
  images?: [ 
    {
      alpha?: double(name='Alpha', example='0.9'),
      height?: double(name='Height', description='This parameter is required.', example='0.2'),
      imageCropMode?: int32(name='ImageCropMode', example='2'),
      layer?: int32(name='Layer', example='0'),
      url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
      width?: double(name='Width', description='This parameter is required.', example='0.2'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Images'),
  layoutSpecifiedUsersShrink?: string(name='LayoutSpecifiedUsers'),
  panes?: [ 
    {
      backgrounds?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneBackgroundCropMode?: int32(name='PaneBackgroundCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123xx.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Backgrounds'),
      images?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          display?: string(name='Display', example='backup'),
          height?: double(name='Height', description='This parameter is required.', example='0.2'),
          layer?: int32(name='Layer', example='0'),
          paneImageCropMode?: int32(name='PaneImageCropMode', example='2'),
          url?: string(name='Url', description='This parameter is required.', example='https://aliyun.com/123.jpg'),
          width?: double(name='Width', description='This parameter is required.', example='0.2'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Images'),
      paneCropMode?: int32(name='PaneCropMode', example='2'),
      paneId?: int32(name='PaneId', example='1'),
      reservePaneForOfflineUser?: boolean(name='ReservePaneForOfflineUser'),
      source?: string(name='Source', example='22'),
      sourceType?: string(name='SourceType', example='video'),
      texts?: [ 
        {
          alpha?: double(name='Alpha', example='0.9'),
          boxAlpha?: double(name='BoxAlpha', example='0.6'),
          boxBorderw?: int32(name='BoxBorderw', example='5'),
          boxColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='BoxColor'),
          display?: string(name='Display', example='backup'),
          font?: int32(name='Font', example='0'),
          fontColor?: {
            b?: int32(name='B', example='255'),
            g?: int32(name='G', example='255'),
            r?: int32(name='R', example='255'),
          }(name='FontColor'),
          fontSize?: int32(name='FontSize', example='36'),
          hasBox?: boolean(name='HasBox'),
          layer?: int32(name='Layer', example='0'),
          texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
          x?: double(name='X', description='This parameter is required.', example='0.2'),
          y?: double(name='Y', description='This parameter is required.', example='0.2'),
        }
      ](name='Texts'),
      videoOrder?: string(name='VideoOrder', example='cameraFirst'),
      whiteboard?: {
        whiteboardId?: string(name='WhiteboardId', example='default'),
      }(name='Whiteboard'),
    }
  ](name='Panes'),
  taskId?: string(name='TaskId', description='This parameter is required.', example='123'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='567'),
  texts?: [ 
    {
      alpha?: double(name='Alpha', example='0.1'),
      boxAlpha?: double(name='BoxAlpha', example='0.6'),
      boxBorderw?: int32(name='BoxBorderw', example='5'),
      boxColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='BoxColor'),
      font?: int32(name='Font', example='0'),
      fontColor?: {
        b?: int32(name='B', example='255'),
        g?: int32(name='G', example='255'),
        r?: int32(name='R', example='255'),
      }(name='FontColor'),
      fontSize?: int32(name='FontSize', example='36'),
      hasBox?: boolean(name='HasBox'),
      layer?: int32(name='Layer', example='0'),
      texture?: string(name='Texture', description='This parameter is required.', example='文字水印'),
      x?: double(name='X', description='This parameter is required.', example='0.2'),
      y?: double(name='Y', description='This parameter is required.', example='0.2'),
    }
  ](name='Texts'),
}

model UpdateStreamingOutResponseBody = {
  requestId?: string(name='RequestId', example='16A96B9A-F203-4EC5-8E43-CB92E68F4CF8'),
  taskId?: string(name='TaskId', example='123'),
}

model UpdateStreamingOutResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateStreamingOutResponseBody(name='body'),
}

/**
 * @summary 更新旁路推流任务
 *
 * @param tmpReq UpdateStreamingOutRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateStreamingOutResponse
 */
async function updateStreamingOutWithOptions(tmpReq: UpdateStreamingOutRequest, runtime: $RuntimeOptions): UpdateStreamingOutResponse {
  tmpReq.validate();
  var request = new UpdateStreamingOutShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.layoutSpecifiedUsers)) {
    request.layoutSpecifiedUsersShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.layoutSpecifiedUsers, 'LayoutSpecifiedUsers', 'json');
  }
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.backgrounds)) {
    query['Backgrounds'] = request.backgrounds;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.clockWidgets)) {
    query['ClockWidgets'] = request.clockWidgets;
  }
  if (!$isNull(request.images)) {
    query['Images'] = request.images;
  }
  if (!$isNull(request.layoutSpecifiedUsersShrink)) {
    query['LayoutSpecifiedUsers'] = request.layoutSpecifiedUsersShrink;
  }
  if (!$isNull(request.panes)) {
    query['Panes'] = request.panes;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.texts)) {
    query['Texts'] = request.texts;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateStreamingOut',
    version = '2018-01-11',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新旁路推流任务
 *
 * @param request UpdateStreamingOutRequest
 * @return UpdateStreamingOutResponse
 */
async function updateStreamingOut(request: UpdateStreamingOutRequest): UpdateStreamingOutResponse {
  var runtime = new $RuntimeOptions{};
  return updateStreamingOutWithOptions(request, runtime);
}

